Commit 2c932d4c authored by Ashish Samant's avatar Ashish Samant Committed by Miklos Szeredi

fuse: Fix return value from fuse_get_user_pages()

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: 742f9927 ("fuse: return patrial success from fuse_direct_io()")
Signed-off-by: default avatarAshish Samant <ashish.samant@oracle.com>
Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 02da2d72
...@@ -1295,7 +1295,7 @@ static int fuse_get_user_pages(struct fuse_req *req, struct iov_iter *ii, ...@@ -1295,7 +1295,7 @@ static int fuse_get_user_pages(struct fuse_req *req, struct iov_iter *ii,
*nbytesp = nbytes; *nbytesp = nbytes;
return ret; return ret < 0 ? ret : 0;
} }
static inline int fuse_iter_npages(const struct iov_iter *ii_p) static inline int fuse_iter_npages(const struct iov_iter *ii_p)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment