Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1e05416 authored by Joonsoo Kim's avatar Joonsoo Kim Committed by Pekka Enberg
Browse files

mm/sl[au]b: correct allocation type check in kmalloc_slab()



commit "slab: Common Kmalloc cache determination" made mistake
in kmalloc_slab(). SLAB_CACHE_DMA is for kmem_cache creation,
not for allocation. For allocation, we should use GFP_XXX to identify
type of allocation. So, change SLAB_CACHE_DMA to GFP_DMA.

Acked-by: default avatarChristoph Lameter <cl@linux.com>
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarJoonsoo Kim <js1304@gmail.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent db845067
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -382,7 +382,7 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags)
		index = fls(size - 1);

#ifdef CONFIG_ZONE_DMA
	if (unlikely((flags & SLAB_CACHE_DMA)))
	if (unlikely((flags & GFP_DMA)))
		return kmalloc_dma_caches[index];

#endif