diff --git a/include/linux/slab.h b/include/linux/slab.h
index 386af639dcaa8265564e694e81d1ed143914a96d..74f105847d13ceae757c8aa6b83bdf8412816696 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -430,7 +430,7 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
 {
 #ifndef CONFIG_SLOB
 	if (__builtin_constant_p(size) &&
-		size <= KMALLOC_MAX_CACHE_SIZE && !(flags & SLAB_CACHE_DMA)) {
+		size <= KMALLOC_MAX_CACHE_SIZE && !(flags & GFP_DMA)) {
 		int i = kmalloc_index(size);
 
 		if (!i)