Skip to content

Commit

Permalink
fuse: Fix return value from fuse_get_user_pages()
Browse files Browse the repository at this point in the history
fuse_get_user_pages() should return error or 0. Otherwise fuse_direct_io
read will not return 0 to indicate that read has completed.

Fixes: 742f992 ("fuse: return patrial success from fuse_direct_io()")
Signed-off-by: Ashish Samant <[email protected]>
Signed-off-by: Seth Forshee <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
  • Loading branch information
Ashish Samant authored and Miklos Szeredi committed Apr 25, 2016
1 parent 02da2d7 commit 2c932d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ static int fuse_get_user_pages(struct fuse_req *req, struct iov_iter *ii,

*nbytesp = nbytes;

return ret;
return ret < 0 ? ret : 0;
}

static inline int fuse_iter_npages(const struct iov_iter *ii_p)
Expand Down

0 comments on commit 2c932d4

Please sign in to comment.