From b03d69d9990f6240b486ec6951d76aa6b6fec050 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Fri, 18 Mar 2011 12:05:22 +0800 Subject: [PATCH] --- yaml --- r: 257005 b: refs/heads/master c: 9801c60e99ed76c5730fb290c00bfad12a419972 h: refs/heads/master i: 257003: 00eb0c8c3f46187fb8c536162132908fc7395bd1 v: v3 --- [refs] | 2 +- trunk/security/selinux/netnode.c | 20 ++------------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index 1628874f96e4..330cb9158963 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f218a7ee7a1c37058eef4bb5fefff9bdb0f52766 +refs/heads/master: 9801c60e99ed76c5730fb290c00bfad12a419972 diff --git a/trunk/security/selinux/netnode.c b/trunk/security/selinux/netnode.c index 3618251d0fdb..8b691a863186 100644 --- a/trunk/security/selinux/netnode.c +++ b/trunk/security/selinux/netnode.c @@ -68,22 +68,6 @@ static LIST_HEAD(sel_netnode_list); static DEFINE_SPINLOCK(sel_netnode_lock); static struct sel_netnode_bkt sel_netnode_hash[SEL_NETNODE_HASH_SIZE]; -/** - * sel_netnode_free - Frees a node entry - * @p: the entry's RCU field - * - * Description: - * This function is designed to be used as a callback to the call_rcu() - * function so that memory allocated to a hash table node entry can be - * released safely. - * - */ -static void sel_netnode_free(struct rcu_head *p) -{ - struct sel_netnode *node = container_of(p, struct sel_netnode, rcu); - kfree(node); -} - /** * sel_netnode_hashfn_ipv4 - IPv4 hashing function for the node table * @addr: IPv4 address @@ -193,7 +177,7 @@ static void sel_netnode_insert(struct sel_netnode *node) rcu_dereference(sel_netnode_hash[idx].list.prev), struct sel_netnode, list); list_del_rcu(&tail->list); - call_rcu(&tail->rcu, sel_netnode_free); + kfree_rcu(tail, rcu); } else sel_netnode_hash[idx].size++; } @@ -306,7 +290,7 @@ static void sel_netnode_flush(void) list_for_each_entry_safe(node, node_tmp, &sel_netnode_hash[idx].list, list) { list_del_rcu(&node->list); - call_rcu(&node->rcu, sel_netnode_free); + kfree_rcu(node, rcu); } sel_netnode_hash[idx].size = 0; }