fuse: set mapping error in writepage_locked when it fails

This ensures that we see errors on fsync when writeback fails.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
Jeff Layton 2017-05-25 06:57:50 -04:00 committed by Miklos Szeredi
parent 61c12b49e1
commit 9183976ef1
1 changed files with 1 additions and 0 deletions

View File

@ -1669,6 +1669,7 @@ err_nofile:
err_free: err_free:
fuse_request_free(req); fuse_request_free(req);
err: err:
mapping_set_error(page->mapping, error);
end_page_writeback(page); end_page_writeback(page);
return error; return error;
} }