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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index eae1ca1caebd..81a28d6662e4 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -27,6 +27,7 @@
27#include <linux/list.h> 27#include <linux/list.h>
28#include <linux/sysdev.h> 28#include <linux/sysdev.h>
29#include <linux/ctype.h> 29#include <linux/ctype.h>
30#include <linux/edac.h>
30#include <asm/uaccess.h> 31#include <asm/uaccess.h>
31#include <asm/page.h> 32#include <asm/page.h>
32#include <asm/edac.h> 33#include <asm/edac.h>
@@ -241,6 +242,7 @@ static int add_mc_to_global_list (struct mem_ctl_info *mci)
241 } 242 }
242 243
243 list_add_tail_rcu(&mci->link, insert_before); 244 list_add_tail_rcu(&mci->link, insert_before);
245 atomic_inc(&edac_handlers);
244 return 0; 246 return 0;
245 247
246fail0: 248fail0:
@@ -267,6 +269,7 @@ static void complete_mc_list_del(struct rcu_head *head)
267 269
268static void del_mc_from_global_list(struct mem_ctl_info *mci) 270static void del_mc_from_global_list(struct mem_ctl_info *mci)
269{ 271{
272 atomic_dec(&edac_handlers);
270 list_del_rcu(&mci->link); 273 list_del_rcu(&mci->link);
271 init_completion(&mci->complete); 274 init_completion(&mci->complete);
272 call_rcu(&mci->rcu, complete_mc_list_del); 275 call_rcu(&mci->rcu, complete_mc_list_del);