diff options
-rw-r--r-- | include/linux/slab.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h index a015236cc572..cebcd3833c76 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -82,8 +82,8 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | |||
82 | * to do various tricks to work around compiler limitations in order to | 82 | * to do various tricks to work around compiler limitations in order to |
83 | * ensure proper constant folding. | 83 | * ensure proper constant folding. |
84 | */ | 84 | */ |
85 | #define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) <= 25 ? \ | 85 | #define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT - 1) <= 25 ? \ |
86 | (MAX_ORDER + PAGE_SHIFT) : 25) | 86 | (MAX_ORDER + PAGE_SHIFT - 1) : 25) |
87 | 87 | ||
88 | #define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_HIGH) | 88 | #define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_HIGH) |
89 | #define KMALLOC_MAX_ORDER (KMALLOC_SHIFT_HIGH - PAGE_SHIFT) | 89 | #define KMALLOC_MAX_ORDER (KMALLOC_SHIFT_HIGH - PAGE_SHIFT) |