aboutsummaryrefslogtreecommitdiffstats
path: root/security/device_cgroup.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2011-03-15 06:07:57 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-07-20 14:05:30 -0400
commit6034f7e603cd2dae8ed9a1d8d2ccfeb6b5c48d73 (patch)
treedc18a4d1374dbd4e15414c67cb44bd359aefd62d /security/device_cgroup.c
parentb119cbab3aecd19dbd748a9823c02d200b96b2f8 (diff)
security,rcu: Convert call_rcu(whitelist_item_free) to kfree_rcu()
The rcu callback whitelist_item_free() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(whitelist_item_free). Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: James Morris <jmorris@namei.org> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'security/device_cgroup.c')
-rw-r--r--security/device_cgroup.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 1be68269e1c2..4450fbeec411 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -125,14 +125,6 @@ static int dev_whitelist_add(struct dev_cgroup *dev_cgroup,
125 return 0; 125 return 0;
126} 126}
127 127
128static void whitelist_item_free(struct rcu_head *rcu)
129{
130 struct dev_whitelist_item *item;
131
132 item = container_of(rcu, struct dev_whitelist_item, rcu);
133 kfree(item);
134}
135
136/* 128/*
137 * called under devcgroup_mutex 129 * called under devcgroup_mutex
138 */ 130 */
@@ -155,7 +147,7 @@ remove:
155 walk->access &= ~wh->access; 147 walk->access &= ~wh->access;
156 if (!walk->access) { 148 if (!walk->access) {
157 list_del_rcu(&walk->list); 149 list_del_rcu(&walk->list);
158 call_rcu(&walk->rcu, whitelist_item_free); 150 kfree_rcu(walk, rcu);
159 } 151 }
160 } 152 }
161} 153}