Skip to content
Snippets Groups Projects
Commit dc8844aa authored by Ernesto A. Fernández's avatar Ernesto A. Fernández Committed by Linus Torvalds
Browse files

hfsplus: update timestamps on truncate()

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

This patch can be tested with xfstests generic/313.

Link: http://lkml.kernel.org/r/9beb0913eea37288599e8e1b7cec8768fb52d1b8.1539316825.git.ernesto.mnd.fernandez@gmail.com


Signed-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 1267a07b
No related branches found
No related tags found
No related merge requests found
...@@ -261,6 +261,7 @@ static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr) ...@@ -261,6 +261,7 @@ static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr)
} }
truncate_setsize(inode, attr->ia_size); truncate_setsize(inode, attr->ia_size);
hfsplus_file_truncate(inode); hfsplus_file_truncate(inode);
inode->i_mtime = inode->i_ctime = current_time(inode);
} }
setattr_copy(inode, attr); setattr_copy(inode, attr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment