]> git.baikalelectronics.ru Git - kernel.git/commit
fix truncate inode time modification breakage
authorNick Piggin <npiggin@suse.de>
Thu, 3 Jun 2010 12:01:46 +0000 (22:01 +1000)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 4 Jun 2010 21:16:30 +0000 (17:16 -0400)
commit5c3066d54f578ae8fe0c238d03543c6818ff40f9
treeeb4e6fb6873355a2a96b698aeb371eb058a88c87
parent08f948c20d368b0925cbf44c6fb66a2acf8fde9f
fix truncate inode time modification breakage

mtime and ctime should be changed only if the file size has actually
changed. Patches changing ext2 and tmpfs from vmtruncate to new truncate
sequence has caused regressions where they always update timestamps.

There is some strange cases in POSIX where truncate(2) must not update
times unless the size has acutally changed, see b95fb94bb.

This area is all still rather buggy in different ways in a lot of
filesystems and needs a cleanup and audit (ideally the vfs will provide
a simple attribute or call to direct all filesystems exactly which
attributes to change). But coming up with the best solution will take a
while and is not appropriate for rc anyway.

So fix recent regression for now.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ext2/inode.c
mm/shmem.c