[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1363366257-4886-4-git-send-email-laijs@cn.fujitsu.com>
Date: Sat, 16 Mar 2013 00:50:51 +0800
From: Lai Jiangshan <laijs@...fujitsu.com>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Cc: Lai Jiangshan <laijs@...fujitsu.com>, Robin Holt <holt@....com>,
Andrea Arcangeli <aarcange@...hat.com>,
Gavin Shan <shangw@...ux.vnet.ibm.com>,
Sasha Levin <sasha.levin@...cle.com>, linux-mm@...ck.org
Subject: [PATCH 3/9] mmu_notifier: use DEFINE_STATIC_SRCU() to define srcu struct
DEFINE_STATIC_SRCU() defines srcu struct and do init at build time.
also remove unneeded mmu_notifier_init().
Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
---
mm/mmu_notifier.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c
index be04122..aa7c785 100644
--- a/mm/mmu_notifier.c
+++ b/mm/mmu_notifier.c
@@ -20,7 +20,7 @@
#include <linux/slab.h>
/* global SRCU for all MMs */
-static struct srcu_struct srcu;
+DEFINE_STATIC_SRCU(srcu);
/*
* This function can't run concurrently against mmu_notifier_register
@@ -326,9 +326,3 @@ void mmu_notifier_unregister(struct mmu_notifier *mn, struct mm_struct *mm)
}
EXPORT_SYMBOL_GPL(mmu_notifier_unregister);
-static int __init mmu_notifier_init(void)
-{
- return init_srcu_struct(&srcu);
-}
-
-module_init(mmu_notifier_init);
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists