Skip to content

Commit 1373ca1

Browse files
YuezhangMonamjaejeon
authored andcommitted
exfat: fix ctime is not updated
Commit 4c72a36 ("exfat: convert to new timestamp accessors") removed attr_copy() from exfat_set_attr(). It causes xfstests generic/221 to fail. In xfstests generic/221, it tests ctime should be updated even if futimens() update atime only. But in this case, ctime will not be updated if attr_copy() is removed. attr_copy() may also update other attributes, and removing it may cause other bugs, so this commit restores to call attr_copy() in exfat_set_attr(). Fixes: 4c72a36 ("exfat: convert to new timestamp accessors") Signed-off-by: Yuezhang Mo <[email protected]> Reviewed-by: Andy Wu <[email protected]> Reviewed-by: Aoyama Wataru <[email protected]> Reviewed-by: Sungjong Seo <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
1 parent fc12a72 commit 1373ca1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/exfat/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ int exfat_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
295295
if (attr->ia_valid & ATTR_SIZE)
296296
inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode));
297297

298+
setattr_copy(&nop_mnt_idmap, inode, attr);
298299
exfat_truncate_inode_atime(inode);
299300

300301
if (attr->ia_valid & ATTR_SIZE) {

0 commit comments

Comments
 (0)