diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1912,7 +1912,7 @@ static inline int calculate_order(int size) | |||
1912 | * Doh this slab cannot be placed using slub_max_order. | 1912 | * Doh this slab cannot be placed using slub_max_order. |
1913 | */ | 1913 | */ |
1914 | order = slab_order(size, 1, MAX_ORDER, 1); | 1914 | order = slab_order(size, 1, MAX_ORDER, 1); |
1915 | if (order <= MAX_ORDER) | 1915 | if (order < MAX_ORDER) |
1916 | return order; | 1916 | return order; |
1917 | return -ENOSYS; | 1917 | return -ENOSYS; |
1918 | } | 1918 | } |
@@ -2525,6 +2525,7 @@ __setup("slub_min_order=", setup_slub_min_order); | |||
2525 | static int __init setup_slub_max_order(char *str) | 2525 | static int __init setup_slub_max_order(char *str) |
2526 | { | 2526 | { |
2527 | get_option(&str, &slub_max_order); | 2527 | get_option(&str, &slub_max_order); |
2528 | slub_max_order = min(slub_max_order, MAX_ORDER - 1); | ||
2528 | 2529 | ||
2529 | return 1; | 2530 | return 1; |
2530 | } | 2531 | } |