mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
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: Christoph Lameter <cl@linux.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Joonsoo Kim <js1304@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
parent
db84506734
commit
b1e0541674
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue