Skip to content

Commit e31195a

Browse files
fs/ntfs3: Fix incorrect if in ntfs_set_acl_ex
We need to update ctime too with mode. Fixes xfstest generic/307 Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 0e8235d commit e31195a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fs/ntfs3/xattr.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,10 +638,9 @@ static noinline int ntfs_set_acl_ex(struct user_namespace *mnt_userns,
638638
err = 0; /* Removing non existed xattr. */
639639
if (!err) {
640640
set_cached_acl(inode, type, acl);
641-
if (inode->i_mode != mode) {
642-
inode->i_mode = mode;
643-
mark_inode_dirty(inode);
644-
}
641+
inode->i_mode = mode;
642+
inode->i_ctime = current_time(inode);
643+
mark_inode_dirty(inode);
645644
}
646645

647646
out:

0 commit comments

Comments
 (0)