summaryrefslogtreecommitdiff
path: root/fs/fuse
diff options
context:
space:
mode:
authorAshish Samant <ashish.samant@oracle.com>2016-03-25 20:53:41 +0300
committerMiklos Szeredi <mszeredi@veci.piliscsaba.szeredi.hu>2016-04-25 14:01:04 +0300
commit2c932d4c9165ddbe417af612dbe2113df7f2057e (patch)
treebac3819e0bb3e00b479655f01c187470d8452418 /fs/fuse
parent02da2d72174c61988eb4456b53f405e3ebdebce4 (diff)
downloadlinux-2c932d4c9165ddbe417af612dbe2113df7f2057e.tar.xz
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: 742f992708df ("fuse: return patrial success from fuse_direct_io()") Signed-off-by: Ashish Samant <ashish.samant@oracle.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 719924d6c706..dcad5e210525 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -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)