slab allocators: MAX_ORDER one off fix
[deliverable/linux.git] / include / linux / slab.h
index a015236cc572b8f11a52bcea9ebf9a23251be934..cebcd3833c767e4849a59eb29277eec0e73ec89d 100644 (file)
@@ -82,8 +82,8 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep,
  * to do various tricks to work around compiler limitations in order to
  * ensure proper constant folding.
  */
-#define KMALLOC_SHIFT_HIGH     ((MAX_ORDER + PAGE_SHIFT) <= 25 ? \
-                               (MAX_ORDER + PAGE_SHIFT) : 25)
+#define KMALLOC_SHIFT_HIGH     ((MAX_ORDER + PAGE_SHIFT - 1) <= 25 ? \
+                               (MAX_ORDER + PAGE_SHIFT - 1) : 25)
 
 #define KMALLOC_MAX_SIZE       (1UL << KMALLOC_SHIFT_HIGH)
 #define KMALLOC_MAX_ORDER      (KMALLOC_SHIFT_HIGH - PAGE_SHIFT)
This page took 0.0236 seconds and 5 git commands to generate.