All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs: remove unnecessary condition check
@ 2020-10-10 14:48 Chengguang Xu
  0 siblings, 0 replies; only message in thread
From: Chengguang Xu @ 2020-10-10 14:48 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, Chengguang Xu

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

Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
---
 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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-10 23:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-10 14:48 [PATCH] fs: remove unnecessary condition check Chengguang Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.