From: Jeff Layton <jlayton@redhat.com>
Date: Tue, 25 Jul 2017 10:50:41 -0400
Subject: ceph: use errseq_t for writeback error reporting
Git-commit: b74fceae734dbd45f79b93bd262b03c39f538413
Patch-mainline: v4.14-rc1
References: FATE#324714
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>
Acked-by: Luis Henriques <lhenriques@suse.com>
---
fs/ceph/caps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index b675c004f6a7..19b97b47b3c9 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -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;