diff options
author | Joonsoo Kim <js1304@gmail.com> | 2013-02-04 09:46:46 -0500 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2013-02-06 13:37:55 -0500 |
commit | b1e0541674904db00e17ce646b0a1d54f59136a5 (patch) | |
tree | 2d53f1ffcca5fcb72fe22e0797c7d829c7bd28c2 /mm | |
parent | db8450673458e724229e91050ac9a92253b01234 (diff) |
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c index 6d73f0b7f21c..2f0e7d5976cb 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c | |||
@@ -382,7 +382,7 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags) | |||
382 | index = fls(size - 1); | 382 | index = fls(size - 1); |
383 | 383 | ||
384 | #ifdef CONFIG_ZONE_DMA | 384 | #ifdef CONFIG_ZONE_DMA |
385 | if (unlikely((flags & SLAB_CACHE_DMA))) | 385 | if (unlikely((flags & GFP_DMA))) |
386 | return kmalloc_dma_caches[index]; | 386 | return kmalloc_dma_caches[index]; |
387 | 387 | ||
388 | #endif | 388 | #endif |