From: Casey Schaufler Date: Tue, 28 Apr 2020 22:00:26 +0000 (-0700) Subject: Smack:- Remove redundant inode_smack cache X-Git-Tag: v5.10.7~2462^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ca75287064be97ac6b67e332e0c082291a515dc;p=platform%2Fkernel%2Flinux-rpi.git Smack:- Remove redundant inode_smack cache The inode_smack cache is no longer used. Remove it. Signed-off-by: Vishal Goel Signed-off-by: Casey Schaufler --- diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 3393569..6d4883a 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -52,7 +52,6 @@ static DEFINE_MUTEX(smack_ipv6_lock); static LIST_HEAD(smk_ipv6_port_list); -static struct kmem_cache *smack_inode_cache; struct kmem_cache *smack_rule_cache; int smack_enabled; @@ -4747,15 +4746,9 @@ static __init int smack_init(void) struct cred *cred = (struct cred *) current->cred; struct task_smack *tsp; - smack_inode_cache = KMEM_CACHE(inode_smack, 0); - if (!smack_inode_cache) - return -ENOMEM; - smack_rule_cache = KMEM_CACHE(smack_rule, 0); - if (!smack_rule_cache) { - kmem_cache_destroy(smack_inode_cache); + if (!smack_rule_cache) return -ENOMEM; - } /* * Set the security state for the initial task.