aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2010-06-29 13:09:18 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-07 12:32:11 -0800
commitb81cbf898c9f6983216bfd44ba5553c9ecd76b7d (patch)
tree58203e5e066898d4281b369739c5b7abdc6a4bcf /fs
parent3b83e963b92ac32af38b379d9bb30d84c383b40d (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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 773793368a7..bb92b7c5cdc 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1221,7 +1221,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);
}
/**