]> git.itanic.dy.fi Git - linux-stable/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 09:18:43 +0000 (11:18 +0200)
commitf7eb9c228bda60f5ec48706fa64526fa34a034e7
tree4294bfc5ddc127327e2cac1c6fd7f097351758b9
parentc4005b74d9f68eda1fc83fbe0bd63c6b93fe020a
ext4: update mtime in ext4_punch_hole even if no blocks are released

commit eee597ac931305eff3d3fd1d61d6aae553bc0984 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inode.c