The commit is pushed to "branch-rh7-3.10.0-327.18.2.vz7.15.x-ovz" and will 
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.18.2.vz7.14.27
------>
commit 2e8a93df0e035c066a8558e184af6c32cbe2207e
Author: Alexey Kuznetsov <[email protected]>
Date:   Tue Jul 19 13:20:00 2016 +0400

    ms/fuse: fsync() does not return IO errors
    
    Two bugs: one is trivial misprint, another is more serious:
    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()
    
    https://jira.sw.ru/browse/PSBM-49821
    #VSTOR-670
    
    Signed-off-by: Alexey Kuznetsov <[email protected]>
    Acked-by: Maxim Patlasov <[email protected]>
---
 fs/fuse/file.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 9889e26..0ef7fe1 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -667,9 +667,19 @@ int fuse_fsync_common(struct file *file, loff_t start, 
loff_t end,
 
        fuse_sync_writes(inode);
 
+       /* 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()
+        */
+       if (test_and_clear_bit(AS_ENOSPC, &file->f_mapping->flags))
+               err = -ENOSPC;
+       if (test_and_clear_bit(AS_EIO, &file->f_mapping->flags))
+               err = -EIO;
+       if (err)
+               goto out;
+
        if (test_bit(FUSE_I_MTIME_UPDATED,
                     &get_fuse_inode(inode)->state)) {
-               int err = fuse_flush_mtime(file, false);
+               err = fuse_flush_mtime(file, false);
                if (err)
                        goto out;
        }
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to