diff options
author | Ashish Samant <ashish.samant@oracle.com> | 2016-03-25 10:53:41 -0700 |
---|---|---|
committer | Miklos Szeredi <mszeredi@veci.piliscsaba.szeredi.hu> | 2016-04-25 13:01:04 +0200 |
commit | 2c932d4c9165ddbe417af612dbe2113df7f2057e (patch) | |
tree | bac3819e0bb3e00b479655f01c187470d8452418 /fs/fuse/file.c | |
parent | 02da2d72174c61988eb4456b53f405e3ebdebce4 (diff) | |
download | linux-2c932d4c9165ddbe417af612dbe2113df7f2057e.tar.bz2 |
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/file.c')
-rw-r--r-- | fs/fuse/file.c | 2 |
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) |