Skip to content

Commit

Permalink
Smack:- Remove redundant inode_smack cache
Browse files Browse the repository at this point in the history
The inode_smack cache is no longer used.
Remove it.

Signed-off-by: Vishal Goel <[email protected]>
Signed-off-by: Casey Schaufler <[email protected]>
  • Loading branch information
cschaufler committed May 6, 2020
1 parent 921bb1c commit 4ca7528
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions security/smack/smack_lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 4ca7528

Please sign in to comment.