提交 e25974aa 编写于 作者: D Daniel Wagner 提交者: Linus Torvalds

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.

Link: http://lkml.kernel.org/r/20200116131642.642-1-dwagner@suse.deSigned-off-by: NDaniel Wagner <dwagner@suse.de>
Reviewed-by: NAndrew Morton <akpm@linux-foundation.org>
Cc: "Tobin C. Harding" <tobin@kernel.org>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 648b5cf3
...@@ -720,11 +720,11 @@ static void slab_debug(struct slabinfo *s) ...@@ -720,11 +720,11 @@ static void slab_debug(struct slabinfo *s)
return; return;
if (sanity && !s->sanity_checks) { if (sanity && !s->sanity_checks) {
set_obj(s, "sanity", 1); set_obj(s, "sanity_checks", 1);
} }
if (!sanity && s->sanity_checks) { if (!sanity && s->sanity_checks) {
if (slab_empty(s)) if (slab_empty(s))
set_obj(s, "sanity", 0); set_obj(s, "sanity_checks", 0);
else else
fprintf(stderr, "%s not empty cannot disable sanity checks\n", s->name); fprintf(stderr, "%s not empty cannot disable sanity checks\n", s->name);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册