summaryrefslogtreecommitdiff
path: root/fs/fuse
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2020-06-25 12:39:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-22 09:33:03 +0200
commit408ef501b894e94581c62e4d9aea18589786ddbb (patch)
tree85e7e34f6315705cfce0ca59f342139db60f8a68 /fs/fuse
parent9b810684b1da7bda726e55bdc2a48af223dc5f83 (diff)
fuse: don't ignore errors from fuse_writepages_fill()
[ Upstream commit 7779b047a57f6824a43d0e1f70de2741b7426b9d ] fuse_writepages() ignores some errors taken from fuse_writepages_fill() I believe it is a bug: if .writepages is called with WB_SYNC_ALL it should either guarantee that all data was successfully saved or return error. Fixes: 26d614df1da9 ("fuse: Implement writepages callback") Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/file.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 66214707a945..d5963ef65c38 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -2148,10 +2148,8 @@ static int fuse_writepages(struct address_space *mapping,
err = write_cache_pages(mapping, wbc, fuse_writepages_fill, &data);
if (data.wpa) {
- /* Ignore errors if we can write at least one page */
WARN_ON(!data.wpa->ia.ap.num_pages);
fuse_writepages_send(&data);
- err = 0;
}
if (data.ff)
fuse_file_put(data.ff, false, false);