Skip to content

Commit 4ca7528

Browse files
committed
Smack:- Remove redundant inode_smack cache
The inode_smack cache is no longer used. Remove it. Signed-off-by: Vishal Goel <[email protected]> Signed-off-by: Casey Schaufler <[email protected]>
1 parent 921bb1c commit 4ca7528

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

security/smack/smack_lsm.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252

5353
static DEFINE_MUTEX(smack_ipv6_lock);
5454
static LIST_HEAD(smk_ipv6_port_list);
55-
static struct kmem_cache *smack_inode_cache;
5655
struct kmem_cache *smack_rule_cache;
5756
int smack_enabled;
5857

@@ -4747,15 +4746,9 @@ static __init int smack_init(void)
47474746
struct cred *cred = (struct cred *) current->cred;
47484747
struct task_smack *tsp;
47494748

4750-
smack_inode_cache = KMEM_CACHE(inode_smack, 0);
4751-
if (!smack_inode_cache)
4752-
return -ENOMEM;
4753-
47544749
smack_rule_cache = KMEM_CACHE(smack_rule, 0);
4755-
if (!smack_rule_cache) {
4756-
kmem_cache_destroy(smack_inode_cache);
4750+
if (!smack_rule_cache)
47574751
return -ENOMEM;
4758-
}
47594752

47604753
/*
47614754
* Set the security state for the initial task.

0 commit comments

Comments
 (0)