aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/edac_mc.c')
-rw-r--r--drivers/edac/edac_mc.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index eac09cc86aac..226d4fdb15fd 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -1451,6 +1451,24 @@ static int add_mc_to_global_list (struct mem_ctl_info *mci)
1451} 1451}
1452 1452
1453 1453
1454static void complete_mc_list_del (struct rcu_head *head)
1455{
1456 struct mem_ctl_info *mci;
1457
1458 mci = container_of(head, struct mem_ctl_info, rcu);
1459 INIT_LIST_HEAD(&mci->link);
1460 complete(&mci->complete);
1461}
1462
1463
1464static void del_mc_from_global_list (struct mem_ctl_info *mci)
1465{
1466 list_del_rcu(&mci->link);
1467 init_completion(&mci->complete);
1468 call_rcu(&mci->rcu, complete_mc_list_del);
1469 wait_for_completion(&mci->complete);
1470}
1471
1454 1472
1455EXPORT_SYMBOL(edac_mc_add_mc); 1473EXPORT_SYMBOL(edac_mc_add_mc);
1456 1474
@@ -1511,24 +1529,6 @@ finish:
1511} 1529}
1512 1530
1513 1531
1514
1515static void complete_mc_list_del (struct rcu_head *head)
1516{
1517 struct mem_ctl_info *mci;
1518
1519 mci = container_of(head, struct mem_ctl_info, rcu);
1520 INIT_LIST_HEAD(&mci->link);
1521 complete(&mci->complete);
1522}
1523
1524static void del_mc_from_global_list (struct mem_ctl_info *mci)
1525{
1526 list_del_rcu(&mci->link);
1527 init_completion(&mci->complete);
1528 call_rcu(&mci->rcu, complete_mc_list_del);
1529 wait_for_completion(&mci->complete);
1530}
1531
1532EXPORT_SYMBOL(edac_mc_del_mc); 1532EXPORT_SYMBOL(edac_mc_del_mc);
1533 1533
1534/** 1534/**