diff options
author | Changli Gao <xiaosuo@gmail.com> | 2010-06-29 07:09:18 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-06-30 02:12:37 -0400 |
commit | 2cb4b05e7647891b46b91c07c9a60304803d1688 (patch) | |
tree | 7eae6d9fbee1d85feabb942c4a826700c4d6f9a3 /fs | |
parent | 984bc9601f64fd341b8573021d7c999f1f1499a9 (diff) |
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')
-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 740e6b9faf7a..41900496d3bb 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -1282,7 +1282,8 @@ static int direct_splice_actor(struct pipe_inode_info *pipe, | |||
1282 | { | 1282 | { |
1283 | struct file *file = sd->u.file; | 1283 | struct file *file = sd->u.file; |
1284 | 1284 | ||
1285 | return do_splice_from(pipe, file, &sd->pos, sd->total_len, sd->flags); | 1285 | return do_splice_from(pipe, file, &file->f_pos, sd->total_len, |
1286 | sd->flags); | ||
1286 | } | 1287 | } |
1287 | 1288 | ||
1288 | /** | 1289 | /** |