[PATCH v2 15/17] fuse: set mapping error in writepage_locked when it fails
From: Jeff Layton
Date: Wed Apr 12 2017 - 08:07:19 EST
This ensures that we see errors on fsync when writeback fails.
Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
fs/fuse/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 7972fdb189bf..c098baf668e6 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1672,6 +1672,7 @@ static int fuse_writepage_locked(struct page *page)
err_free:
fuse_request_free(req);
err:
+ mapping_set_error(page->mapping, error);
end_page_writeback(page);
return error;
}
--
2.9.3