From: Kaixu Xia Date: Fri, 4 Dec 2020 00:43:19 +0000 (-0800) Subject: xfs: remove unnecessary null check in xfs_generic_create X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=88269b880a8ea38cf607e684906f3b00acd5b56b;p=linux.git 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 Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 1414ab79eacfc..d1ecf7669fc80 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -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: