diff options
-rw-r--r-- | drivers/edac/edac_device.c | 5 | ||||
-rw-r--r-- | drivers/edac/edac_mc.c | 4 | ||||
-rw-r--r-- | drivers/edac/edac_pci.c | 4 |
3 files changed, 3 insertions, 10 deletions
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index b02a6a69a8f..d5e13c94714 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c | |||
@@ -356,7 +356,6 @@ static void complete_edac_device_list_del(struct rcu_head *head) | |||
356 | 356 | ||
357 | edac_dev = container_of(head, struct edac_device_ctl_info, rcu); | 357 | edac_dev = container_of(head, struct edac_device_ctl_info, rcu); |
358 | INIT_LIST_HEAD(&edac_dev->link); | 358 | INIT_LIST_HEAD(&edac_dev->link); |
359 | complete(&edac_dev->removal_complete); | ||
360 | } | 359 | } |
361 | 360 | ||
362 | /* | 361 | /* |
@@ -369,10 +368,8 @@ static void del_edac_device_from_global_list(struct edac_device_ctl_info | |||
369 | *edac_device) | 368 | *edac_device) |
370 | { | 369 | { |
371 | list_del_rcu(&edac_device->link); | 370 | list_del_rcu(&edac_device->link); |
372 | |||
373 | init_completion(&edac_device->removal_complete); | ||
374 | call_rcu(&edac_device->rcu, complete_edac_device_list_del); | 371 | call_rcu(&edac_device->rcu, complete_edac_device_list_del); |
375 | wait_for_completion(&edac_device->removal_complete); | 372 | rcu_barrier(); |
376 | } | 373 | } |
377 | 374 | ||
378 | /* | 375 | /* |
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index 335b7ebdb11..b629c41756f 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c | |||
@@ -418,16 +418,14 @@ static void complete_mc_list_del(struct rcu_head *head) | |||
418 | 418 | ||
419 | mci = container_of(head, struct mem_ctl_info, rcu); | 419 | mci = container_of(head, struct mem_ctl_info, rcu); |
420 | INIT_LIST_HEAD(&mci->link); | 420 | INIT_LIST_HEAD(&mci->link); |
421 | complete(&mci->complete); | ||
422 | } | 421 | } |
423 | 422 | ||
424 | static void del_mc_from_global_list(struct mem_ctl_info *mci) | 423 | static void del_mc_from_global_list(struct mem_ctl_info *mci) |
425 | { | 424 | { |
426 | atomic_dec(&edac_handlers); | 425 | atomic_dec(&edac_handlers); |
427 | list_del_rcu(&mci->link); | 426 | list_del_rcu(&mci->link); |
428 | init_completion(&mci->complete); | ||
429 | call_rcu(&mci->rcu, complete_mc_list_del); | 427 | call_rcu(&mci->rcu, complete_mc_list_del); |
430 | wait_for_completion(&mci->complete); | 428 | rcu_barrier(); |
431 | } | 429 | } |
432 | 430 | ||
433 | /** | 431 | /** |
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c index 30b585b1d60..efb5d565078 100644 --- a/drivers/edac/edac_pci.c +++ b/drivers/edac/edac_pci.c | |||
@@ -174,7 +174,6 @@ static void complete_edac_pci_list_del(struct rcu_head *head) | |||
174 | 174 | ||
175 | pci = container_of(head, struct edac_pci_ctl_info, rcu); | 175 | pci = container_of(head, struct edac_pci_ctl_info, rcu); |
176 | INIT_LIST_HEAD(&pci->link); | 176 | INIT_LIST_HEAD(&pci->link); |
177 | complete(&pci->complete); | ||
178 | } | 177 | } |
179 | 178 | ||
180 | /* | 179 | /* |
@@ -185,9 +184,8 @@ static void complete_edac_pci_list_del(struct rcu_head *head) | |||
185 | static void del_edac_pci_from_global_list(struct edac_pci_ctl_info *pci) | 184 | static void del_edac_pci_from_global_list(struct edac_pci_ctl_info *pci) |
186 | { | 185 | { |
187 | list_del_rcu(&pci->link); | 186 | list_del_rcu(&pci->link); |
188 | init_completion(&pci->complete); | ||
189 | call_rcu(&pci->rcu, complete_edac_pci_list_del); | 187 | call_rcu(&pci->rcu, complete_edac_pci_list_del); |
190 | wait_for_completion(&pci->complete); | 188 | rcu_barrier(); |
191 | } | 189 | } |
192 | 190 | ||
193 | #if 0 | 191 | #if 0 |