From e2e77098764636456ba7092a8b3b3b34b2a8e8d8 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Thu, 26 May 2011 16:25:58 -0700 Subject: edac,rcu: use synchronize_rcu() instead of call_rcu()+rcu_barrier() synchronize_rcu() does the stuff as needed. Signed-off-by: Lai Jiangshan Cc: Doug Thompson Cc: "Paul E. McKenney" Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/edac/edac_pci.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'drivers/edac/edac_pci.c') diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c index efb5d5650783..2b378207d571 100644 --- a/drivers/edac/edac_pci.c +++ b/drivers/edac/edac_pci.c @@ -163,19 +163,6 @@ fail1: return 1; } -/* - * complete_edac_pci_list_del - * - * RCU completion callback to indicate item is deleted - */ -static void complete_edac_pci_list_del(struct rcu_head *head) -{ - struct edac_pci_ctl_info *pci; - - pci = container_of(head, struct edac_pci_ctl_info, rcu); - INIT_LIST_HEAD(&pci->link); -} - /* * del_edac_pci_from_global_list * @@ -184,8 +171,12 @@ static void complete_edac_pci_list_del(struct rcu_head *head) static void del_edac_pci_from_global_list(struct edac_pci_ctl_info *pci) { list_del_rcu(&pci->link); - call_rcu(&pci->rcu, complete_edac_pci_list_del); - rcu_barrier(); + + /* these are for safe removal of devices from global list while + * NMI handlers may be traversing list + */ + synchronize_rcu(); + INIT_LIST_HEAD(&pci->link); } #if 0 -- cgit