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

ipc,rcu: Convert call_rcu(ipc_immediate_free) to kfree_rcu()

The rcu callback ipc_immediate_free() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(ipc_immediate_free).
Signed-off-by: default avatarLai Jiangshan <>
Signed-off-by: default avatarPaul E. McKenney <>
Cc: Andrew Morton <>
Reviewed-by: default avatarJosh Triplett <>
parent 693a8b6e
......@@ -579,19 +579,6 @@ static void ipc_schedule_free(struct rcu_head *head)
* ipc_immediate_free - free ipc + rcu space
* @head: RCU callback structure that contains pointer to be freed
* Free from the RCU callback context.
static void ipc_immediate_free(struct rcu_head *head)
struct ipc_rcu_grace *free =
container_of(head, struct ipc_rcu_grace, rcu);
void ipc_rcu_putref(void *ptr)
if (--container_of(ptr, struct ipc_rcu_hdr, data)->refcount > 0)
......@@ -601,8 +588,7 @@ void ipc_rcu_putref(void *ptr)
call_rcu(&container_of(ptr, struct ipc_rcu_grace, data)->rcu,
} else {
call_rcu(&container_of(ptr, struct ipc_rcu_grace, data)->rcu,
kfree_rcu(container_of(ptr, struct ipc_rcu_grace, data), 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