From: Andrew Morton mm/slab.c: In function '__cache_alloc': mm/slab.c:3064: warning: implicit declaration of function 'alternate_node_alloc' mm/slab.c:3064: warning: assignment makes pointer from integer without a cast mm/slab.c:3073: warning: implicit declaration of function '__cache_alloc_node' mm/slab.c:3073: warning: assignment makes pointer from integer without a cast mm/slab.c: At top level: mm/slab.c:3194: error: conflicting types for '__cache_alloc_node' mm/slab.c:3073: error: previous implicit declaration of '__cache_alloc_node' was here mm/slab.c:3200: error: conflicting types for 'alternate_node_alloc' mm/slab.c:3064: error: previous implicit declaration of 'alternate_node_alloc' was here Cc: Christoph Lameter Signed-off-by: Andrew Morton --- mm/slab.c | 66 ++++++++++++++++++++++++++-------------------------- 1 files changed, 33 insertions(+), 33 deletions(-) diff -puN mm/slab.c~gfp_thisnode-for-the-slab-allocator-v2-fix mm/slab.c --- a/mm/slab.c~gfp_thisnode-for-the-slab-allocator-v2-fix +++ a/mm/slab.c @@ -972,7 +972,39 @@ static int transfer_objects(struct array return nr; } -#ifdef CONFIG_NUMA +#ifndef CONFIG_NUMA + +#define drain_alien_cache(cachep, alien) do { } while (0) +#define reap_alien(cachep, l3) do { } while (0) + +static inline struct array_cache **alloc_alien_cache(int node, int limit) +{ + return (struct array_cache **)BAD_ALIEN_MAGIC; +} + +static inline void free_alien_cache(struct array_cache **ac_ptr) +{ +} + +static inline int cache_free_alien(struct kmem_cache *cachep, void *objp) +{ + return 0; +} + +static inline void *alternate_node_alloc(struct kmem_cache *cachep, + gfp_t flags) +{ + return NULL; +} + +static inline void *__cache_alloc_node(struct kmem_cache *cachep, + gfp_t flags, int nodeid) +{ + return NULL; +} + +#else /* CONFIG_NUMA */ + static void *__cache_alloc_node(struct kmem_cache *, gfp_t, int); static void *alternate_node_alloc(struct kmem_cache *, gfp_t); @@ -1101,26 +1133,6 @@ static inline int cache_free_alien(struc } return 1; } - -#else - -#define drain_alien_cache(cachep, alien) do { } while (0) -#define reap_alien(cachep, l3) do { } while (0) - -static inline struct array_cache **alloc_alien_cache(int node, int limit) -{ - return (struct array_cache **)BAD_ALIEN_MAGIC; -} - -static inline void free_alien_cache(struct array_cache **ac_ptr) -{ -} - -static inline int cache_free_alien(struct kmem_cache *cachep, void *objp) -{ - return 0; -} - #endif static int __cpuinit cpuup_callback(struct notifier_block *nfb, @@ -3188,18 +3200,6 @@ must_grow: done: return obj; } -#else -static inline void *__cache_alloc_node(struct kmem_cache *cachep, - gfp_t flags, int nodeid) -{ - return NULL; -} - -static inline void *alternate_node_alloc(struct kmem_cache *cachep, - gfp_t flags) -{ - return NULL; -} #endif /* _