xfs: remove unnecessary null check in xfs_generic_create

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 <kaixuxia@tencent.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
Kaixu Xia 2020-12-03 16:43:19 -08:00 committed by Darrick J. Wong
parent b3b29cd106
commit 88269b880a

View File

@ -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: