summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-01-17 17:42:02 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2020-01-17 17:42:02 +0100
commitab7541c3addd344939e76d0636da0048ce24f2db (patch)
tree38dd8aa76af46e47354d7a3c4fc64834c6c9bd54 /fs
parentMerge tag 'sound-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ti... (diff)
parentfuse: fix fuse_send_readpages() in the syncronous read case (diff)
downloadlinux-ab7541c3addd344939e76d0636da0048ce24f2db.tar.xz
linux-ab7541c3addd344939e76d0636da0048ce24f2db.zip
Merge tag 'fuse-fixes-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse
Pull fuse fix from Miklos Szeredi: "Fix a regression in the last release affecting the ftp module of the gvfs filesystem" * tag 'fuse-fixes-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix fuse_send_readpages() in the syncronous read case
Diffstat (limited to 'fs')
-rw-r--r--fs/fuse/file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index a63d779eac10..ce715380143c 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -882,6 +882,7 @@ static void fuse_send_readpages(struct fuse_io_args *ia, struct file *file)
struct fuse_args_pages *ap = &ia->ap;
loff_t pos = page_offset(ap->pages[0]);
size_t count = ap->num_pages << PAGE_SHIFT;
+ ssize_t res;
int err;
ap->args.out_pages = true;
@@ -896,7 +897,8 @@ static void fuse_send_readpages(struct fuse_io_args *ia, struct file *file)
if (!err)
return;
} else {
- err = fuse_simple_request(fc, &ap->args);
+ res = fuse_simple_request(fc, &ap->args);
+ err = res < 0 ? res : 0;
}
fuse_readpages_end(fc, &ap->args, err);
}