[RHEL7,COMMIT] ms/ext4: use errseq_t based error handling for reporting data writeback errors

Submitted by Konstantin Khorenko on June 9, 2018, 10:29 a.m.

Details

Message ID 201806091029.w59ATcx6024601@finist_ce7.work
State New
Series "ms/ext4: use errseq_t based error handling for reporting data writeback errors"
Headers show

Commit Message

Konstantin Khorenko June 9, 2018, 10:29 a.m.
The commit is pushed to "branch-rh7-3.10.0-862.vz7.48.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.el7
------>
commit 9a73c92298e30cc78db9b431ef8b4a227a912a43
Author: Vasily Averin <vvs@virtuozzo.com>
Date:   Sat Jun 9 13:29:38 2018 +0300

    ms/ext4: use errseq_t based error handling for reporting data writeback errors
    
    mainline commit 6acec59 ("ext4: use errseq_t based error handling for reporting data writeback errors")
    
    Add a call to filemap_report_wb_err at the end of ext4_sync_file. This
    will ensure that we check and advance the errseq_t in the file, which
    allows us to track and report errors on all open fds when they occur.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
 fs/ext4/fsync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
index 4826dc0cc80b..5bccf2ad1b34 100644
--- a/fs/ext4/fsync.c
+++ b/fs/ext4/fsync.c
@@ -113,7 +113,7 @@  int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
 		goto out;
 	}
 
-	ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
+	ret = file_write_and_wait_range(file, start, end);
 	if (ret)
 		return ret;