]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ext4: update c/mtime on truncate up
authorEryu Guan <guaneryu@gmail.com>
Tue, 28 Jul 2015 19:08:41 +0000 (15:08 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 31 Jul 2016 04:46:52 +0000 (21:46 -0700)
commitbd348721b6345130ad1a8a1cb43f33f1518986ff
tree405509a16e2ea25765ceeece369e2e4625fbd49d
parent8b0139a09c3046a891eaed989b4c30c7cac2ddb9
ext4: update c/mtime on truncate up

Commit 3da40c7b0898 ("ext4: only call ext4_truncate when size <= isize")
introduced a bug that c/mtime is not updated on truncate up.

Fix the issue by setting c/mtime explicitly in the truncate up case.

Note that ftruncate(2) is not affected, so you won't see this bug using
truncate(1) and xfs_io(1).

Orabug: 24377419

Signed-off-by: Zirong Lang <zorro.lang@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-By: Dan Duval <dan.duval@oracle.com>
fs/ext4/inode.c