Skip to content

Commit

Permalink
fuse: fix retrieve length
Browse files Browse the repository at this point in the history
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>
Cc: stable@vger.kernel.org
  • Loading branch information
Miklos Szeredi committed Sep 4, 2012
1 parent 381bf7c commit c9e67d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1576,6 +1576,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++;
Expand Down

0 comments on commit c9e67d4

Please sign in to comment.