From: Yang Xu Date: Wed, 20 Apr 2022 08:48:00 +0000 (+0300) Subject: fs/ntfs3: Use the same order for acl pointer check in ntfs_init_acl X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=19e890ff3bedc36fe3cd1cb7d03bfb66c5fdf1db;p=linux.git fs/ntfs3: Use the same order for acl pointer check in ntfs_init_acl For the readability and unity of the code, adjust the order Signed-off-by: Yang Xu Reviewed-by: Kari Argillander Signed-off-by: Konstantin Komarov --- diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c index 5e0e0280e70de..2d29afe4b40b1 100644 --- a/fs/ntfs3/xattr.c +++ b/fs/ntfs3/xattr.c @@ -706,13 +706,13 @@ int ntfs_init_acl(struct user_namespace *mnt_userns, struct inode *inode, inode->i_default_acl = NULL; } - if (!acl) - inode->i_acl = NULL; - else { + if (acl) { if (!err) err = ntfs_set_acl_ex(mnt_userns, inode, acl, ACL_TYPE_ACCESS, true); posix_acl_release(acl); + } else { + inode->i_acl = NULL; } return err;