ceph: use errseq_t for writeback error reporting
authorJeff Layton <jlayton@redhat.com>
Tue, 25 Jul 2017 14:50:41 +0000 (10:50 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 6 Sep 2017 17:56:44 +0000 (19:56 +0200)
Ensure that when writeback errors are marked that we report those to all
file descriptions that were open at the time of the error.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c

index b675c004f6a7045b637b2cd6434056a63a3634a7..19b97b47b3c9cbc2e6d35ea9e44a663eb03d6bd7 100644 (file)
@@ -2113,7 +2113,7 @@ int ceph_fsync(struct file *file, loff_t start, loff_t end, int datasync)
 
        dout("fsync %p%s\n", inode, datasync ? " datasync" : "");
 
-       ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
+       ret = file_write_and_wait_range(file, start, end);
        if (ret < 0)
                goto out;