mm/slub.c: parse slub_debug O option in switch statement
By moving the O option detection into the switch statement, we allow this parameter to be combined with other options correctly. Previously options like slub_debug=OFZ would only detect the 'o' and use DEBUG_DEFAULT_FLAGS to fill in the rest of the flags. Signed-off-by: Chris J Arges <chris.j.arges@canonical.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Acked-by: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
ef2a5153b4
commit
08303a73c6
16
mm/slub.c
16
mm/slub.c
@@ -1137,15 +1137,6 @@ static int __init setup_slub_debug(char *str)
|
|||||||
*/
|
*/
|
||||||
goto check_slabs;
|
goto check_slabs;
|
||||||
|
|
||||||
if (tolower(*str) == 'o') {
|
|
||||||
/*
|
|
||||||
* Avoid enabling debugging on caches if its minimum order
|
|
||||||
* would increase as a result.
|
|
||||||
*/
|
|
||||||
disable_higher_order_debug = 1;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
slub_debug = 0;
|
slub_debug = 0;
|
||||||
if (*str == '-')
|
if (*str == '-')
|
||||||
/*
|
/*
|
||||||
@@ -1176,6 +1167,13 @@ static int __init setup_slub_debug(char *str)
|
|||||||
case 'a':
|
case 'a':
|
||||||
slub_debug |= SLAB_FAILSLAB;
|
slub_debug |= SLAB_FAILSLAB;
|
||||||
break;
|
break;
|
||||||
|
case 'o':
|
||||||
|
/*
|
||||||
|
* Avoid enabling debugging on caches if its minimum
|
||||||
|
* order would increase as a result.
|
||||||
|
*/
|
||||||
|
disable_higher_order_debug = 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
pr_err("slub_debug option '%c' unknown. skipped\n",
|
pr_err("slub_debug option '%c' unknown. skipped\n",
|
||||||
*str);
|
*str);
|
||||||
|
|||||||
Reference in New Issue
Block a user