Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hfs: update timestamp on truncate()

The vfs takes care of updating mtime on ftruncate(), but on truncate() it
must be done by the module.

Link: http://lkml.kernel.org/r/e1611eda2985b672ed2d8677350b4ad8c2d07e8a.1539316825.git.ernesto.mnd.fernandez@gmail.com
Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Reviewed-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ernesto A. Fernández and committed by
Linus Torvalds
8cd3cb50 dc8844aa

+2
+2
fs/hfs/inode.c
··· 642 642 643 643 truncate_setsize(inode, attr->ia_size); 644 644 hfs_file_truncate(inode); 645 + inode->i_atime = inode->i_mtime = inode->i_ctime = 646 + current_time(inode); 645 647 } 646 648 647 649 setattr_copy(inode, attr);