lkml.org 
[lkml]   [2009]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[splice PATCH 1/3] splice: use "long" for tee() return values
Date
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


\
 
 \ /
  Last update: 2009-04-30 14:15    [W:0.071 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site