mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
hfs: update timestamp on truncate()
[ Upstream commit 8cd3cb5061
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
47b8860bb8
commit
dcc4cf3be9
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue