]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ext4/extents.c
Merge tag 'platform-drivers-x86-v4.12-2' of git://git.infradead.org/linux-platform...
[karo-tx-linux.git] / fs / ext4 / extents.c
index 83a513efc824a39dbf876f0225f1d0d6ff78f385..3e36508610b796b6612cc1e670a0fc2c8c3c282a 100644 (file)
@@ -4877,6 +4877,8 @@ static long ext4_zero_range(struct file *file, loff_t offset,
 
        /* Zero out partial block at the edges of the range */
        ret = ext4_zero_partial_blocks(handle, inode, offset, len);
+       if (ret >= 0)
+               ext4_update_inode_fsync_trans(handle, inode, 1);
 
        if (file->f_flags & O_SYNC)
                ext4_handle_sync(handle);
@@ -5563,6 +5565,7 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
                ext4_handle_sync(handle);
        inode->i_mtime = inode->i_ctime = current_time(inode);
        ext4_mark_inode_dirty(handle, inode);
+       ext4_update_inode_fsync_trans(handle, inode, 1);
 
 out_stop:
        ext4_journal_stop(handle);
@@ -5736,6 +5739,8 @@ int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len)
        up_write(&EXT4_I(inode)->i_data_sem);
        if (IS_SYNC(inode))
                ext4_handle_sync(handle);
+       if (ret >= 0)
+               ext4_update_inode_fsync_trans(handle, inode, 1);
 
 out_stop:
        ext4_journal_stop(handle);