ext4: update mtime in ext4_punch_hole even if no blocks are released
authorLukas Czerner <lczerner@redhat.com>
Sun, 13 May 2018 23:28:35 +0000 (19:28 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 13 May 2018 23:28:35 +0000 (19:28 -0400)
commiteee597ac931305eff3d3fd1d61d6aae553bc0984
tree51d56d6f378440437c1134d4983ca05a402c62db
parent6390d33bf5d9b24fd4f96e415b6888f59c8494f9
ext4: update mtime in ext4_punch_hole even if no blocks are released

Currently in ext4_punch_hole we're going to skip the mtime update if
there are no actual blocks to release. However we've actually modified
the file by zeroing the partial block so the mtime should be updated.

Moreover the sync and datasync handling is skipped as well, which is
also wrong. Fix it.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reported-by: Joe Habermann <joe.habermann@quantum.com>
Cc: <stable@vger.kernel.org>
fs/ext4/inode.c