Skip to content

Commit

Permalink
fuse: don't ignore errors from fuse_writepages_fill()
Browse files Browse the repository at this point in the history
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: 26d614d ("fuse: Implement writepages callback")
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  • Loading branch information
Vasily Averin authored and Miklos Szeredi committed Jul 14, 2020
1 parent 6ddf3af commit 7779b04
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2165,10 +2165,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);
Expand Down

0 comments on commit 7779b04

Please sign in to comment.