Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

make mm/rmap.c:anon_vma_cachep static

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>

authored by

Adrian Bunk and committed by
Linus Torvalds
fdd2e5f8 1a651a00

+11 -13
-12
include/linux/rmap.h
··· 39 39 40 40 #ifdef CONFIG_MMU 41 41 42 - extern struct kmem_cache *anon_vma_cachep; 43 - 44 - static inline struct anon_vma *anon_vma_alloc(void) 45 - { 46 - return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL); 47 - } 48 - 49 - static inline void anon_vma_free(struct anon_vma *anon_vma) 50 - { 51 - kmem_cache_free(anon_vma_cachep, anon_vma); 52 - } 53 - 54 42 static inline void anon_vma_lock(struct vm_area_struct *vma) 55 43 { 56 44 struct anon_vma *anon_vma = vma->anon_vma;
+11 -1
mm/rmap.c
··· 55 55 56 56 #include "internal.h" 57 57 58 - struct kmem_cache *anon_vma_cachep; 58 + static struct kmem_cache *anon_vma_cachep; 59 + 60 + static inline struct anon_vma *anon_vma_alloc(void) 61 + { 62 + return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL); 63 + } 64 + 65 + static inline void anon_vma_free(struct anon_vma *anon_vma) 66 + { 67 + kmem_cache_free(anon_vma_cachep, anon_vma); 68 + } 59 69 60 70 /** 61 71 * anon_vma_prepare - attach an anon_vma to a memory region