summaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorAshish Samant <ashish.samant@oracle.com>2016-03-25 10:53:41 -0700
committerMiklos Szeredi <mszeredi@veci.piliscsaba.szeredi.hu>2016-04-25 13:01:04 +0200
commit2c932d4c9165ddbe417af612dbe2113df7f2057e (patch)
treebac3819e0bb3e00b479655f01c187470d8452418 /fs/fuse
parent02da2d72174c61988eb4456b53f405e3ebdebce4 (diff)
downloadop-kernel-dev-2c932d4c9165ddbe417af612dbe2113df7f2057e.zip
op-kernel-dev-2c932d4c9165ddbe417af612dbe2113df7f2057e.tar.gz
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 719924d..dcad5e2 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)
OpenPOWER on IntegriCloud