Skip to content

Commit

Permalink
fs/ntfs3: Use the same order for acl pointer check in ntfs_init_acl
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
xuyang0410 authored and aalexandrovich committed Jun 9, 2022
1 parent ae5a4e4 commit 19e890f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/ntfs3/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 19e890f

Please sign in to comment.