]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/ext2/file.c
fs: check for writeback errors after syncing out buffers in generic_file_fsync
[mirror_ubuntu-artful-kernel.git] / fs / ext2 / file.c
index b21891a6bfca6611f9ad89a412594c2e92d695cc..d34d32bdc944add56a4375827e044c8482665c8c 100644 (file)
@@ -174,15 +174,12 @@ int ext2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
 {
        int ret;
        struct super_block *sb = file->f_mapping->host->i_sb;
-       struct address_space *mapping = sb->s_bdev->bd_inode->i_mapping;
 
        ret = generic_file_fsync(file, start, end, datasync);
-       if (ret == -EIO || test_and_clear_bit(AS_EIO, &mapping->flags)) {
+       if (ret == -EIO)
                /* We don't really know where the IO error happened... */
                ext2_error(sb, __func__,
                           "detected IO error when writing metadata buffers");
-               ret = -EIO;
-       }
        return ret;
 }