X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=mm%2Fslab.c;h=c6100628a6ef7be2325a55e18f69b80a5a0f2006;hb=531498013163c72cee8540e98e12c0c430c7fe87;hp=909975f6e0903f4a4f065ded0f109a338193173f;hpb=e05135d1550e73f722ae92909f9c9f44b305e9e2;p=karo-tx-linux.git diff --git a/mm/slab.c b/mm/slab.c index 909975f6e090..c6100628a6ef 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3281,7 +3281,7 @@ retry: flags | GFP_THISNODE, nid); } - if (!obj) { + if (!obj && !(flags & __GFP_NO_GROW)) { /* * This allocation will be performed within the constraints * of the current cpuset / memory policy requirements. @@ -3310,7 +3310,7 @@ retry: */ goto retry; } else { - kmem_freepages(cache, obj); + /* cache_grow already freed obj */ obj = NULL; } } @@ -3553,7 +3553,7 @@ EXPORT_SYMBOL(kmem_cache_zalloc); * * Currently only used for dentry validation. */ -int fastcall kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr) +int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr) { unsigned long addr = (unsigned long)ptr; unsigned long min_addr = PAGE_OFFSET; @@ -3587,6 +3587,7 @@ out: * @cachep: The cache to allocate from. * @flags: See kmalloc(). * @nodeid: node number of the target node. + * @caller: return address of caller, used for debug information * * Identical to kmem_cache_alloc but it will allocate memory on the given * node, which can improve the performance for cpu bound structures.