mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Max Kellermann <mk@cm4all.com>
To: linux-kernel@vger.kernel.org
Cc: jens.axboe@oracle.com, w@1wt.eu
Subject: [splice PATCH 1/3] splice: use "long" for tee() return values
Date: Thu, 30 Apr 2009 14:03:42 +0200	[thread overview]
Message-ID: <20090430120342.5689.74090.stgit@rabbit.intern.cm-ag> (raw)

do_tee() and other internal functions related to that have a "long"
return value.  Internally, some of them work with an "int ret".
Convert them to "long".

Signed-off-by: Max Kellermann <mk@cm4all.com>
---

 fs/splice.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/fs/splice.c b/fs/splice.c
index 666953d..f07e304 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1589,12 +1589,13 @@ static int link_opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
 /*
  * Link contents of ipipe to opipe.
  */
-static int link_pipe(struct pipe_inode_info *ipipe,
-		     struct pipe_inode_info *opipe,
-		     size_t len, unsigned int flags)
+static long link_pipe(struct pipe_inode_info *ipipe,
+		      struct pipe_inode_info *opipe,
+		      size_t len, unsigned int flags)
 {
 	struct pipe_buffer *ibuf, *obuf;
-	int ret = 0, i = 0, nbuf;
+	long ret = 0;
+	int i = 0, nbuf;
 
 	/*
 	 * Potential ABBA deadlock, work around it by ordering lock
@@ -1679,7 +1680,7 @@ static long do_tee(struct file *in, struct file *out, size_t len,
 {
 	struct pipe_inode_info *ipipe = pipe_info(in->f_path.dentry->d_inode);
 	struct pipe_inode_info *opipe = pipe_info(out->f_path.dentry->d_inode);
-	int ret = -EINVAL;
+	long ret = -EINVAL;
 
 	/*
 	 * Duplicate the contents of ipipe to opipe without actually


             reply	other threads:[~2009-04-30 12:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-30 12:03 Max Kellermann [this message]
2009-04-30 12:03 ` [splice PATCH 2/3] tee: don't return 0 when another task drains/fills a pipe Max Kellermann
2009-04-30 12:03 ` [splice PATCH 3/3] splice: added support for pipe-to-pipe splice() Max Kellermann
2009-04-30 13:35   ` Vegard Nossum
2009-04-30 13:50     ` Max Kellermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090430120342.5689.74090.stgit@rabbit.intern.cm-ag \
    --to=mk@cm4all.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®