diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2021-04-30 07:55:05 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-04-30 20:20:36 +0200 |
commit | 608b5d668c8ea6734594a401c9adab4093ad9847 (patch) | |
tree | 92a9e461af92477af777068724f29e7805a2b75e /mm/page_owner.c | |
parent | mm: page_owner: fetch backtrace only for tracked pages (diff) | |
download | linux-608b5d668c8ea6734594a401c9adab4093ad9847.tar.xz linux-608b5d668c8ea6734594a401c9adab4093ad9847.zip |
mm: page_owner: use kstrtobool() to parse bool option
I tried to use page_owner=1 for a while noticed too late it had no effect
as opposed to similar init_on_alloc=1 (these work).
Let's make them consistent.
The change decreses binary size slightly:
text data bss dec hex filename
12408 321 17 12746 31ca mm/page_owner.o.before
12320 321 17 12658 3172 mm/page_owner.o.after
Link: https://lkml.kernel.org/r/20210401210909.3532086-1-slyfox@gentoo.org
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_owner.c')
-rw-r--r-- | mm/page_owner.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/mm/page_owner.c b/mm/page_owner.c index 590c2c89af74..5c941ca9861d 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -42,13 +42,7 @@ static void init_early_allocated_pages(void); static int __init early_page_owner_param(char *buf) { - if (!buf) - return -EINVAL; - - if (strcmp(buf, "on") == 0) - page_owner_enabled = true; - - return 0; + return kstrtobool(buf, &page_owner_enabled); } early_param("page_owner", early_page_owner_param); |