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