[PATCH] slab.c ifdef reduction breaks build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



optional-zone_dma-in-the-vm-no-gfp_dma-check-in-the-slab-if-
no-config_zone_dma-is-set-reduce-config_zone_dma-ifdefs converts some
ifdefs into ifs.

One of them causes cs_dmacachep to be referenced, when that field
doesn't exist, because it's ifdefed on CONFIG_ZONE_DMA.

I'd suggest reverting that chunk.

Signed-off-by: Jeff Dike <[email protected]>
--
 mm/slab.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6.18-mm/mm/slab.c
===================================================================
--- linux-2.6.18-mm.orig/mm/slab.c	2007-01-29 14:32:13.000000000 -0500
+++ linux-2.6.18-mm/mm/slab.c	2007-01-29 15:04:18.000000000 -0500
@@ -1492,14 +1492,15 @@ void __init kmem_cache_init(void)
 					ARCH_KMALLOC_FLAGS|SLAB_PANIC,
 					NULL, NULL);
 		}
-		if (CONFIG_ZONE_DMA_FLAG)
-			sizes->cs_dmacachep = kmem_cache_create(
+#if CONFIG_ZONE_DMA_FLAG
+		sizes->cs_dmacachep = kmem_cache_create(
 					names->name_dma,
 					sizes->cs_size,
 					ARCH_KMALLOC_MINALIGN,
 					ARCH_KMALLOC_FLAGS|SLAB_CACHE_DMA|
 						SLAB_PANIC,
 					NULL, NULL);
+#endif
 		sizes++;
 		names++;
 	}

-- 
Work email - jdike at linux dot intel dot com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux