]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix fdatasync(2) after extent manipulation operations
authorJan Kara <jack@suse.cz>
Mon, 29 May 2017 17:24:55 +0000 (13:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 29 May 2017 17:24:55 +0000 (13:24 -0400)
commitfbac52f1549e0b7d45a1cfb90e835de4816f850b
treeaa5b273ba62c4a0301dae73d13978a5e8217e16c
parent8a77e0c321e63d8ad0a237240347b8b74b6f6e7c
ext4: fix fdatasync(2) after extent manipulation operations

Currently, extent manipulation operations such as hole punch, range
zeroing, or extent shifting do not record the fact that file data has
changed and thus fdatasync(2) has a work to do. As a result if we crash
e.g. after a punch hole and fdatasync, user can still possibly see the
punched out data after journal replay. Test generic/392 fails due to
these problems.

Fix the problem by properly marking that file data has changed in these
operations.

CC: stable@vger.kernel.org
Fixes: 13d5647fc9ac4203a88d339f25076ded58c6792e
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c
fs/ext4/inode.c