summaryrefslogtreecommitdiffstats
path: root/fs/hfs/inode.c
diff options
context:
space:
mode:
authorErnesto A. Fernández <ernesto.mnd.fernandez@gmail.com>2018-10-30 15:06:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-10-31 08:54:13 -0700
commit8cd3cb5061730af085a3f9890a3352f162b4e20c (patch)
treea975da7f0a47b2e3426e88b4069205f8a84100e8 /fs/hfs/inode.c
parentdc8844aada735890a6de109bef327f5df36a982e (diff)
downloadlinux-8cd3cb5061730af085a3f9890a3352f162b4e20c.tar.gz
linux-8cd3cb5061730af085a3f9890a3352f162b4e20c.tar.bz2
linux-8cd3cb5061730af085a3f9890a3352f162b4e20c.zip
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>
Diffstat (limited to 'fs/hfs/inode.c')
-rw-r--r--fs/hfs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
index a2dfa1b2a89c..da243c84e93b 100644
--- a/fs/hfs/inode.c
+++ b/fs/hfs/inode.c
@@ -642,6 +642,8 @@ int hfs_inode_setattr(struct dentry *dentry, struct iattr * attr)
truncate_setsize(inode, attr->ia_size);
hfs_file_truncate(inode);
+ inode->i_atime = inode->i_mtime = inode->i_ctime =
+ current_time(inode);
}
setattr_copy(inode, attr);