From: Lai Jiangshan Date: Tue, 15 Mar 2011 10:07:57 +0000 (+0800) Subject: security,rcu: Convert call_rcu(whitelist_item_free) to kfree_rcu() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6034f7e603cd2dae8ed9a1d8d2ccfeb6b5c48d73;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Paul E. McKenney Acked-by: James Morris Reviewed-by: Josh Triplett --- 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, return 0; } -static void whitelist_item_free(struct rcu_head *rcu) -{ - struct dev_whitelist_item *item; - - item = container_of(rcu, struct dev_whitelist_item, rcu); - kfree(item); -} - /* * called under devcgroup_mutex */ @@ -155,7 +147,7 @@ remove: walk->access &= ~wh->access; if (!walk->access) { list_del_rcu(&walk->list); - call_rcu(&walk->rcu, whitelist_item_free); + kfree_rcu(walk, rcu); } } }