diff mbox

[v2,15/17] fuse: set mapping error in writepage_locked when it fails

Message ID 20170412120614.6111-16-jlayton@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Layton April 12, 2017, 12:06 p.m. UTC
This ensures that we see errors on fsync when writeback fails.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 fs/fuse/file.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

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;
 }