fuse: convert to errseq_t based error tracking for fsync
authorJeff Layton <jlayton@redhat.com>
Sat, 22 Jul 2017 13:27:43 +0000 (09:27 -0400)
committerJeff Layton <jlayton@redhat.com>
Mon, 31 Jul 2017 23:12:25 +0000 (19:12 -0400)
Change to file_write_and_wait_range and
file_check_and_advance_wb_err

Signed-off-by: Jeff Layton <jlayton@redhat.com>
fs/fuse/file.c

index 3ee4fdc3da9ec359ad847afa36354240329a2da6..e2ffc499d106c3682241a0d9badbedc54d413dfb 100644 (file)
@@ -457,7 +457,7 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end,
         * wait for all outstanding writes, before sending the FSYNC
         * request.
         */
-       err = filemap_write_and_wait_range(inode->i_mapping, start, end);
+       err = file_write_and_wait_range(file, start, end);
        if (err)
                goto out;
 
@@ -465,10 +465,10 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end,
 
        /*
         * Due to implementation of fuse writeback
-        * filemap_write_and_wait_range() does not catch errors.
+        * file_write_and_wait_range() does not catch errors.
         * We have to do this directly after fuse_sync_writes()
         */
-       err = filemap_check_errors(file->f_mapping);
+       err = file_check_and_advance_wb_err(file);
        if (err)
                goto out;