[PATCH] fs: remove unnecessary condition check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



posix_acl_release() does NULL pointer check itself
so don't have to check it explicitly.

Signed-off-by: Chengguang Xu <cgxu519@xxxxxxxxxxxx>
---
 fs/posix_acl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/posix_acl.c b/fs/posix_acl.c
index 95882b3f5f62..194c24ee8ba0 100644
--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
@@ -950,9 +950,7 @@ int simple_acl_create(struct inode *dir, struct inode *inode)
 	set_cached_acl(inode, ACL_TYPE_DEFAULT, default_acl);
 	set_cached_acl(inode, ACL_TYPE_ACCESS, 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 0;
 }
-- 
2.26.2






[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux