[RHEL7,COMMIT] ms/fuse: convert to errseq_t based error tracking for fsync

Submitted by Konstantin Khorenko on June 18, 2018, 9:02 a.m.

Details

Message ID 201806180902.w5I9229g019637@finist_ce7.work
State New
Series "ms/fuse: convert to errseq_t based error tracking for fsync"
Headers show

Commit Message

Konstantin Khorenko June 18, 2018, 9:02 a.m.
The commit is pushed to "branch-rh7-3.10.0-862.3.2.vz7.61.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.3.2.vz7.61.3
------>
commit 42b1923db2be2c690b51655fd749f9924ed033d8
Author: Vasily Averin <vvs@virtuozzo.com>
Date:   Mon Jun 18 12:02:02 2018 +0300

    ms/fuse: convert to errseq_t based error tracking for fsync
    
    Change to file_write_and_wait_range and
    file_check_and_advance_wb_err
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    
    https://pmc.acronis.com/browse/VSTOR-10912
    (cherry picked from commit 7e51fe1dd180e525c9cb9dc613c524c83c130867)
    Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
 fs/fuse/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 10158eb2eca0..fa690bb90063 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -703,7 +703,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;
 
@@ -712,7 +712,7 @@  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. 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;