fs/ntfs3: Fix incorrect if in ntfs_set_acl_ex
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 11 Oct 2022 17:00:36 +0000 (20:00 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Mon, 14 Nov 2022 16:50:47 +0000 (19:50 +0300)
We need to update ctime too with mode.
Fixes xfstest generic/307

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/xattr.c

index dd3307117513496d384a8950c211ab8866f4770d..cfd59bb0f9de173c51da6e19201e5f3da7853342 100644 (file)
@@ -638,10 +638,9 @@ static noinline int ntfs_set_acl_ex(struct user_namespace *mnt_userns,
                err = 0; /* Removing non existed xattr. */
        if (!err) {
                set_cached_acl(inode, type, acl);
-               if (inode->i_mode != mode) {
-                       inode->i_mode = mode;
-                       mark_inode_dirty(inode);
-               }
+               inode->i_mode = mode;
+               inode->i_ctime = current_time(inode);
+               mark_inode_dirty(inode);
        }
 
 out: