Commit 8cd3cb50 authored by Ernesto A. Fernández's avatar Ernesto A. Fernández Committed by Linus Torvalds

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.comSigned-off-by: default avatarErnesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Reviewed-by: default avatarVyacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent dc8844aa
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment