aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/slub_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/slub_def.h')
-rw-r--r--include/linux/slub_def.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 4dcbc2c71491..aa5d4a69d461 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -152,12 +152,10 @@ static __always_inline int kmalloc_index(size_t size)
152 if (size <= KMALLOC_MIN_SIZE) 152 if (size <= KMALLOC_MIN_SIZE)
153 return KMALLOC_SHIFT_LOW; 153 return KMALLOC_SHIFT_LOW;
154 154
155#if KMALLOC_MIN_SIZE <= 64 155 if (KMALLOC_MIN_SIZE <= 32 && size > 64 && size <= 96)
156 if (size > 64 && size <= 96)
157 return 1; 156 return 1;
158 if (size > 128 && size <= 192) 157 if (KMALLOC_MIN_SIZE <= 64 && size > 128 && size <= 192)
159 return 2; 158 return 2;
160#endif
161 if (size <= 8) return 3; 159 if (size <= 8) return 3;
162 if (size <= 16) return 4; 160 if (size <= 16) return 4;
163 if (size <= 32) return 5; 161 if (size <= 32) return 5;