Commit 6034f7e6 authored by Lai Jiangshan's avatar Lai Jiangshan Committed by Paul E. McKenney

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: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: default avatarJames Morris <jmorris@namei.org>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
parent b119cbab
......@@ -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 @@ static void dev_whitelist_rm(struct dev_cgroup *dev_cgroup,
walk->access &= ~wh->access;
if (!walk->access) {
list_del_rcu(&walk->list);
call_rcu(&walk->rcu, whitelist_item_free);
kfree_rcu(walk, rcu);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment