From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>, Robin Holt <holt@sgi.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Gavin Shan <shangw@linux.vnet.ibm.com>,
Sasha Levin <sasha.levin@oracle.com>,
linux-mm@kvack.org
Subject: [PATCH 3/9] mmu_notifier: use DEFINE_STATIC_SRCU() to define srcu struct
Date: Sat, 16 Mar 2013 00:50:51 +0800 [thread overview]
Message-ID: <1363366257-4886-4-git-send-email-laijs@cn.fujitsu.com> (raw)
In-Reply-To: <1363366257-4886-1-git-send-email-laijs@cn.fujitsu.com>
DEFINE_STATIC_SRCU() defines srcu struct and do init at build time.
also remove unneeded mmu_notifier_init().
Signed-off-by: Lai Jiangshan <laijs@cn.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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
parent reply other threads:[~2013-03-15 16:52 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1363366257-4886-1-git-send-email-laijs@cn.fujitsu.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363366257-4886-4-git-send-email-laijs@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=holt@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=sasha.levin@oracle.com \
--cc=shangw@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox