Skip to content

Commit

Permalink
make mm/rmap.c:anon_vma_cachep static
Browse files Browse the repository at this point in the history
This patch makes the needlessly global anon_vma_cachep static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Rik van Riel <riel@redhat.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
AdrianBunk authored and torvalds committed Oct 20, 2008
1 parent 1a651a0 commit fdd2e5f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
12 changes: 0 additions & 12 deletions include/linux/rmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,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;
Expand Down
12 changes: 11 additions & 1 deletion mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,17 @@

#include "internal.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);
}

/**
* anon_vma_prepare - attach an anon_vma to a memory region
Expand Down

0 comments on commit fdd2e5f

Please sign in to comment.