summaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChris J Arges <chris.j.arges@canonical.com>2015-04-14 18:44:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 19:48:59 -0400
commit08303a73c62a1cc83c613fa1965f5127ba030c46 (patch)
tree688215f0951470e1dbdfbae5913673fe905627af /mm/slub.c
parentef2a5153b4d2c48c05b9280491cb5592a46df385 (diff)
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>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 82c473780c91..d01f9126fcf2 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1137,15 +1137,6 @@ static int __init setup_slub_debug(char *str)
1137 */ 1137 */
1138 goto check_slabs; 1138 goto check_slabs;
1139 1139
1140 if (tolower(*str) == 'o') {
1141 /*
1142 * Avoid enabling debugging on caches if its minimum order
1143 * would increase as a result.
1144 */
1145 disable_higher_order_debug = 1;
1146 goto out;
1147 }
1148
1149 slub_debug = 0; 1140 slub_debug = 0;
1150 if (*str == '-') 1141 if (*str == '-')
1151 /* 1142 /*
@@ -1176,6 +1167,13 @@ static int __init setup_slub_debug(char *str)
1176 case 'a': 1167 case 'a':
1177 slub_debug |= SLAB_FAILSLAB; 1168 slub_debug |= SLAB_FAILSLAB;
1178 break; 1169 break;
1170 case 'o':
1171 /*
1172 * Avoid enabling debugging on caches if its minimum
1173 * order would increase as a result.
1174 */
1175 disable_higher_order_debug = 1;
1176 break;
1179 default: 1177 default:
1180 pr_err("slub_debug option '%c' unknown. skipped\n", 1178 pr_err("slub_debug option '%c' unknown. skipped\n",
1181 *str); 1179 *str);