Commit 7779b047 authored by Vasily Averin's avatar Vasily Averin Committed by Miklos Szeredi

fuse: don't ignore errors from fuse_writepages_fill()

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: 26d614df ("fuse: Implement writepages callback")
Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 6ddf3af9
...@@ -2165,10 +2165,8 @@ static int fuse_writepages(struct address_space *mapping, ...@@ -2165,10 +2165,8 @@ static int fuse_writepages(struct address_space *mapping,
err = write_cache_pages(mapping, wbc, fuse_writepages_fill, &data); err = write_cache_pages(mapping, wbc, fuse_writepages_fill, &data);
if (data.wpa) { if (data.wpa) {
/* Ignore errors if we can write at least one page */
WARN_ON(!data.wpa->ia.ap.num_pages); WARN_ON(!data.wpa->ia.ap.num_pages);
fuse_writepages_send(&data); fuse_writepages_send(&data);
err = 0;
} }
if (data.ff) if (data.ff)
fuse_file_put(data.ff, false, false); fuse_file_put(data.ff, false, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment