lkml.org 
[lkml]   [2010]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/3] splice: direct_splice_actor() should not use pos in sd
From
Date
From: Changli Gao <xiaosuo@gmail.com>

direct_splice_actor() shouldn't use sd->pos, as sd->pos is for file reading,
file->f_pos should be used instead.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
----
fs/splice.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6/fs/splice.c
===================================================================
--- linux-2.6.orig/fs/splice.c 2010-06-29 12:46:27.000000000 +0200
+++ linux-2.6/fs/splice.c 2010-06-29 12:46:28.000000000 +0200
@@ -1282,7 +1282,8 @@ static int direct_splice_actor(struct pi
{
struct file *file = sd->u.file;

- return do_splice_from(pipe, file, &sd->pos, sd->total_len, sd->flags);
+ return do_splice_from(pipe, file, &file->f_pos, sd->total_len,
+ sd->flags);
}

/**

\
 
 \ /
  Last update: 2010-06-29 13:11    [W:0.065 / U:1.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site