diff options
author | Yang Xu <xuyang2018.jy@fujitsu.com> | 2022-04-20 10:48:00 +0200 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-06-09 18:16:18 +0200 |
commit | 19e890ff3bedc36fe3cd1cb7d03bfb66c5fdf1db (patch) | |
tree | 61399ba7b4380a328cd4028593095d5f2488cd57 /fs/ntfs3 | |
parent | fs/ntfs3: Fix using uninitialized value n when calling indx_read (diff) | |
download | linux-19e890ff3bedc36fe3cd1cb7d03bfb66c5fdf1db.tar.xz linux-19e890ff3bedc36fe3cd1cb7d03bfb66c5fdf1db.zip |
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 <xuyang2018.jy@fujitsu.com>
Reviewed-by: Kari Argillander <kari.argillander@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3')
-rw-r--r-- | fs/ntfs3/xattr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c index 5e0e0280e70d..2d29afe4b40b 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; |