]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
splice: direct_splice_actor() should not use pos in sd
authorChangli Gao <xiaosuo@gmail.com>
Tue, 29 Jun 2010 11:09:18 +0000 (13:09 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Nov 2011 21:47:06 +0000 (13:47 -0800)
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>
fs/splice.c

index 39208663aaf177f56b3e500fd33d8a56a5ecb500..03e42380a3b4146fc25cddba56c765d68dcb653d 100644 (file)
@@ -1231,7 +1231,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);
 }
 
 /**