summaryrefslogtreecommitdiff
path: root/fs/splice.c
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2010-06-29 13:09:18 +0200
committerJens Axboe <jaxboe@fusionio.com>2010-06-30 08:12:37 +0200
commit2cb4b05e7647891b46b91c07c9a60304803d1688 (patch)
tree7eae6d9fbee1d85feabb942c4a826700c4d6f9a3 /fs/splice.c
parent984bc9601f64fd341b8573021d7c999f1f1499a9 (diff)
downloadlinux-3.10-2cb4b05e7647891b46b91c07c9a60304803d1688.tar.gz
linux-3.10-2cb4b05e7647891b46b91c07c9a60304803d1688.tar.bz2
linux-3.10-2cb4b05e7647891b46b91c07c9a60304803d1688.zip
splice: direct_splice_actor() should not use pos in sd
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(-) Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 740e6b9faf7..41900496d3b 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1282,7 +1282,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);
}
/**