ext4: fix fdatasync(2) after extent manipulation operations
[sfrench/cifs-2.6.git] / fs / ext4 / inode.c
index 657a98fa80b672664954ab243de231dc71264bbb..5cf82d03968ca2c0eb240461fa696e784694c1ea 100644 (file)
@@ -4218,6 +4218,8 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
 
        inode->i_mtime = inode->i_ctime = current_time(inode);
        ext4_mark_inode_dirty(handle, inode);
+       if (ret >= 0)
+               ext4_update_inode_fsync_trans(handle, inode, 1);
 out_stop:
        ext4_journal_stop(handle);
 out_dio: