diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -584,7 +584,8 @@ static inline struct array_cache *ac_data(kmem_cache_t *cachep) | |||
584 | return cachep->array[smp_processor_id()]; | 584 | return cachep->array[smp_processor_id()]; |
585 | } | 585 | } |
586 | 586 | ||
587 | static inline kmem_cache_t *__find_general_cachep(size_t size, int gfpflags) | 587 | static inline kmem_cache_t *__find_general_cachep(size_t size, |
588 | unsigned int __nocast gfpflags) | ||
588 | { | 589 | { |
589 | struct cache_sizes *csizep = malloc_sizes; | 590 | struct cache_sizes *csizep = malloc_sizes; |
590 | 591 | ||
@@ -608,7 +609,8 @@ static inline kmem_cache_t *__find_general_cachep(size_t size, int gfpflags) | |||
608 | return csizep->cs_cachep; | 609 | return csizep->cs_cachep; |
609 | } | 610 | } |
610 | 611 | ||
611 | kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags) | 612 | kmem_cache_t *kmem_find_general_cachep(size_t size, |
613 | unsigned int __nocast gfpflags) | ||
612 | { | 614 | { |
613 | return __find_general_cachep(size, gfpflags); | 615 | return __find_general_cachep(size, gfpflags); |
614 | } | 616 | } |
@@ -2100,7 +2102,7 @@ cache_alloc_debugcheck_before(kmem_cache_t *cachep, unsigned int __nocast flags) | |||
2100 | #if DEBUG | 2102 | #if DEBUG |
2101 | static void * | 2103 | static void * |
2102 | cache_alloc_debugcheck_after(kmem_cache_t *cachep, | 2104 | cache_alloc_debugcheck_after(kmem_cache_t *cachep, |
2103 | unsigned long flags, void *objp, void *caller) | 2105 | unsigned int __nocast flags, void *objp, void *caller) |
2104 | { | 2106 | { |
2105 | if (!objp) | 2107 | if (!objp) |
2106 | return objp; | 2108 | return objp; |
@@ -2372,6 +2374,9 @@ void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int nodeid) | |||
2372 | struct slab *slabp; | 2374 | struct slab *slabp; |
2373 | kmem_bufctl_t next; | 2375 | kmem_bufctl_t next; |
2374 | 2376 | ||
2377 | if (nodeid == -1) | ||
2378 | return kmem_cache_alloc(cachep, flags); | ||
2379 | |||
2375 | for (loop = 0;;loop++) { | 2380 | for (loop = 0;;loop++) { |
2376 | struct list_head *q; | 2381 | struct list_head *q; |
2377 | 2382 | ||
@@ -2439,7 +2444,7 @@ got_slabp: | |||
2439 | } | 2444 | } |
2440 | EXPORT_SYMBOL(kmem_cache_alloc_node); | 2445 | EXPORT_SYMBOL(kmem_cache_alloc_node); |
2441 | 2446 | ||
2442 | void *kmalloc_node(size_t size, int flags, int node) | 2447 | void *kmalloc_node(size_t size, unsigned int __nocast flags, int node) |
2443 | { | 2448 | { |
2444 | kmem_cache_t *cachep; | 2449 | kmem_cache_t *cachep; |
2445 | 2450 | ||
@@ -3091,7 +3096,7 @@ unsigned int ksize(const void *objp) | |||
3091 | * @s: the string to duplicate | 3096 | * @s: the string to duplicate |
3092 | * @gfp: the GFP mask used in the kmalloc() call when allocating memory | 3097 | * @gfp: the GFP mask used in the kmalloc() call when allocating memory |
3093 | */ | 3098 | */ |
3094 | char *kstrdup(const char *s, int gfp) | 3099 | char *kstrdup(const char *s, unsigned int __nocast gfp) |
3095 | { | 3100 | { |
3096 | size_t len; | 3101 | size_t len; |
3097 | char *buf; | 3102 | char *buf; |