LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org> To: Rik van Riel <riel@redhat.com> Cc: linux-kernel@vger.kernel.org Subject: [2.6 patch] make mm/rmap.c:anon_vma_cachep static Date: Mon, 25 Feb 2008 02:07:48 +0200 [thread overview] Message-ID: <20080225000748.GG2088@cs181133002.pp.htv.fi> (raw) This patch makes the needlessly global anon_vma_cachep static. Signed-off-by: Adrian Bunk <bunk@kernel.org> --- include/linux/rmap.h | 12 ------------ mm/rmap.c | 12 +++++++++++- 2 files changed, 11 insertions(+), 13 deletions(-) 8d2d63d71ecbf2db78f31025acb136c9dd4db6a2 diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 1383692..8a8dbb9 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -31,18 +31,6 @@ struct anon_vma { #ifdef CONFIG_MMU -extern struct kmem_cache *anon_vma_cachep; - -static inline struct anon_vma *anon_vma_alloc(void) -{ - return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL); -} - -static inline void anon_vma_free(struct anon_vma *anon_vma) -{ - kmem_cache_free(anon_vma_cachep, anon_vma); -} - static inline void anon_vma_lock(struct vm_area_struct *vma) { struct anon_vma *anon_vma = vma->anon_vma; diff --git a/mm/rmap.c b/mm/rmap.c index 8fd527c..ef6bb36 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -52,7 +52,17 @@ #include <asm/tlbflush.h> -struct kmem_cache *anon_vma_cachep; +static struct kmem_cache *anon_vma_cachep; + +static inline struct anon_vma *anon_vma_alloc(void) +{ + return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL); +} + +static inline void anon_vma_free(struct anon_vma *anon_vma) +{ + kmem_cache_free(anon_vma_cachep, anon_vma); +} /* This must be called under the mmap_sem. */ int anon_vma_prepare(struct vm_area_struct *vma)
next reply other threads:[~2008-02-25 0:10 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-02-25 0:07 Adrian Bunk [this message] 2008-03-30 22:48 [2.6 patch] make mm/rmap.c:anon_vma_cachep static Adrian Bunk 2008-04-14 18:14 Adrian Bunk 2008-04-21 21:32 Adrian Bunk 2008-05-05 18:27 Adrian Bunk 2008-05-05 20:05 ` KOSAKI Motohiro 2008-05-05 20:25 ` Rik van Riel 2008-08-06 21:10 Adrian Bunk 2008-08-07 12:42 ` Hugh Dickins
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=20080225000748.GG2088@cs181133002.pp.htv.fi \ --to=bunk@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=riel@redhat.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: linkBe 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; as well as URLs for NNTP newsgroup(s).