Skip to content

Commit

Permalink
xfs: remove unnecessary null check in xfs_generic_create
Browse files Browse the repository at this point in the history
The function posix_acl_release() test the passed-in argument and
move on only when it is non-null, so maybe the null check in
xfs_generic_create is unnecessary.

Signed-off-by: Kaixu Xia <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
  • Loading branch information
kaixuxiakx authored and djwong committed Dec 9, 2020
1 parent b3b29cd commit 88269b8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/xfs/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,8 @@ xfs_generic_create(
xfs_finish_inode_setup(ip);

out_free_acl:
if (default_acl)
posix_acl_release(default_acl);
if (acl)
posix_acl_release(acl);
posix_acl_release(default_acl);
posix_acl_release(acl);
return error;

out_cleanup_inode:
Expand Down

0 comments on commit 88269b8

Please sign in to comment.