fuse: set mapping error in writepage_locked when it fails
authorJeff Layton <jlayton@redhat.com>
Thu, 25 May 2017 10:57:50 +0000 (06:57 -0400)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 11 Aug 2017 09:38:26 +0000 (11:38 +0200)
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>
fs/fuse/file.c

index 810ed4f99e385416c269ba2965b9948a520f1ad6..ab60051be6e533eb167a72e590494f0a46e3a488 100644 (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;
 }