diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-22 19:44:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-22 19:44:08 -0400 |
commit | 0342cbcfced2ee937d7c8e1c63f3d3082da7c7dc (patch) | |
tree | fb98291d321a50de2dfd99f9bcaa33274f0c3952 /ipc/util.c | |
parent | 391d6276db9fbdedfbc30e1b56390414f0e55988 (diff) | |
parent | 7f70893173b056df691b2ee7546bb44fd9abae6a (diff) |
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
rcu: Fix wrong check in list_splice_init_rcu()
net,rcu: Convert call_rcu(xt_rateest_free_rcu) to kfree_rcu()
sysctl,rcu: Convert call_rcu(free_head) to kfree
vmalloc,rcu: Convert call_rcu(rcu_free_vb) to kfree_rcu()
vmalloc,rcu: Convert call_rcu(rcu_free_va) to kfree_rcu()
ipc,rcu: Convert call_rcu(ipc_immediate_free) to kfree_rcu()
ipc,rcu: Convert call_rcu(free_un) to kfree_rcu()
security,rcu: Convert call_rcu(sel_netport_free) to kfree_rcu()
security,rcu: Convert call_rcu(sel_netnode_free) to kfree_rcu()
ia64,rcu: Convert call_rcu(sn_irq_info_free) to kfree_rcu()
block,rcu: Convert call_rcu(disk_free_ptbl_rcu_cb) to kfree_rcu()
scsi,rcu: Convert call_rcu(fc_rport_free_rcu) to kfree_rcu()
audit_tree,rcu: Convert call_rcu(__put_tree) to kfree_rcu()
security,rcu: Convert call_rcu(whitelist_item_free) to kfree_rcu()
md,rcu: Convert call_rcu(free_conf) to kfree_rcu()
Diffstat (limited to 'ipc/util.c')
-rw-r--r-- | ipc/util.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/ipc/util.c b/ipc/util.c index 5c0d28921ba..75261a31d48 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 | */ | ||
588 | static 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 | |||
595 | void ipc_rcu_putref(void *ptr) | 582 | void 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 | ||