Skip to contentSkip to conversation

tools/vm/slabinfo: Fix sanity checks enabling

PATCH Applied Daniel Wagner 1 participant 1 message Jan 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/vm/slabinfo: Fix sanity checks enabling

The sysfs file name for enabling sanity checking is called 'sanity_checks' and not 'sanity'.

The name of the file has never changed since the introduction of the slub allocator. Obviously, most people turn the checks on via the command line option and not during runtime using slabinfo.

Cc "Tobin C. Harding" <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Christoph Lameter <[email protected]>
---
 tools/vm/slabinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/vm/slabinfo.c +2 -2
index 68092d15e12b..9b68658b6bb8 100644
@@ -720,11 +720,11 @@ static void slab_debug(struct slabinfo *s)
 		return;
 
 	if (sanity && !s->sanity_checks) {
-		set_obj(s, "sanity", 1);
+		set_obj(s, "sanity_checks", 1);
 	}
 	if (!sanity && s->sanity_checks) {
 		if (slab_empty(s))
-			set_obj(s, "sanity", 0);
+			set_obj(s, "sanity_checks", 0);
 		else
 			fprintf(stderr, "%s not empty cannot disable sanity checks\n", s->name);
 	}
Signature · 1 line
2.24.1