diff options
author | Changli Gao <xiaosuo@gmail.com> | 2010-06-29 13:09:18 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-02 10:30:07 -0700 |
commit | f2df0ea492e2c5ce9c71d8d261522d817986d269 (patch) | |
tree | 05711d3b9ec4df2d0758de8a34cde9f3d86c85d7 /fs | |
parent | 957e6faf8748ae85f165283b7b0ecf0044315b8e (diff) |
splice: direct_splice_actor() should not use pos in sd
commit 2cb4b05e7647891b46b91c07c9a60304803d1688 upstream.
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>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/splice.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/splice.c b/fs/splice.c index 9313b6124a2..5be13449150 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1232,7 +1232,8 @@ static int direct_splice_actor(struct pipe_inode_info *pipe, { 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); } /** |