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

View File

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