diff options
author | Kaixu Xia <kaixuxia@tencent.com> | 2020-12-04 01:43:19 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-12-09 18:49:38 +0100 |
commit | 88269b880a8ea38cf607e684906f3b00acd5b56b (patch) | |
tree | 4d1e19c36efff133b828a7fa088e5dc10e84cc58 /fs/xfs | |
parent | xfs: directly return if the delta equal to zero (diff) | |
download | linux-88269b880a8ea38cf607e684906f3b00acd5b56b.tar.xz linux-88269b880a8ea38cf607e684906f3b00acd5b56b.zip |
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>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_iops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 1414ab79eacf..d1ecf7669fc8 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: |