]> git.hungrycats.org Git - linux/commitdiff
fuse: fix retrieve length
authorMiklos Szeredi <mszeredi@suse.cz>
Tue, 4 Sep 2012 16:45:54 +0000 (18:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Sep 2012 17:00:50 +0000 (10:00 -0700)
commit c9e67d483776d8d2a5f3f70491161b205930ffe1 upstream.

In some cases fuse_retrieve() would return a short byte count if offset was
non-zero.  The data returned was correct, though.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dev.c

index 2aaf3eaaf13da03e328ac3523fe16ca09a60c690..5c029fb3e087aeb959b1d04c03b3e8a279f8b22d 100644 (file)
@@ -1524,6 +1524,7 @@ static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode,
                req->pages[req->num_pages] = page;
                req->num_pages++;
 
+               offset = 0;
                num -= this_num;
                total_len += this_num;
                index++;