aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/util.c')
-rw-r--r--ipc/util.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/ipc/util.c b/ipc/util.c
index 5c0d28921ba8..75261a31d48d 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -579,19 +579,6 @@ static void ipc_schedule_free(struct rcu_head *head)
579 schedule_work(&sched->work); 579 schedule_work(&sched->work);
580} 580}
581 581
582/**
583 * ipc_immediate_free - free ipc + rcu space
584 * @head: RCU callback structure that contains pointer to be freed
585 *
586 * Free from the RCU callback context.
587 */
588static void ipc_immediate_free(struct rcu_head *head)
589{
590 struct ipc_rcu_grace *free =
591 container_of(head, struct ipc_rcu_grace, rcu);
592 kfree(free);
593}
594
595void ipc_rcu_putref(void *ptr) 582void ipc_rcu_putref(void *ptr)
596{ 583{
597 if (--container_of(ptr, struct ipc_rcu_hdr, data)->refcount > 0) 584 if (--container_of(ptr, struct ipc_rcu_hdr, data)->refcount > 0)
@@ -601,8 +588,7 @@ void ipc_rcu_putref(void *ptr)
601 call_rcu(&container_of(ptr, struct ipc_rcu_grace, data)->rcu, 588 call_rcu(&container_of(ptr, struct ipc_rcu_grace, data)->rcu,
602 ipc_schedule_free); 589 ipc_schedule_free);
603 } else { 590 } else {
604 call_rcu(&container_of(ptr, struct ipc_rcu_grace, data)->rcu, 591 kfree_rcu(container_of(ptr, struct ipc_rcu_grace, data), rcu);
605 ipc_immediate_free);
606 } 592 }
607} 593}
608 594