From: Gergely Risko <gergely@risko.hu>
To: cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Cc: torvalds@linux-foundation.org, Gergely Risko <gergely@risko.hu>
Subject: [PATCH] mm: memcontrol: fix handling of swapaccount parameter
Date: Wed, 14 Aug 2013 15:21:35 +0200 [thread overview]
Message-ID: <1376486495-21457-1-git-send-email-gergely@risko.hu> (raw)
Fixed swap accounting option parsing to enable if called without argument.
Signed-off-by: Gergely Risko <gergely@risko.hu>
---
mm/memcontrol.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c290a1c..8ec2507 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6970,13 +6970,13 @@ struct cgroup_subsys mem_cgroup_subsys = {
static int __init enable_swap_account(char *s)
{
/* consider enabled if no parameter or 1 is given */
- if (!strcmp(s, "1"))
+ if (*s++ != '=' || !*s || !strcmp(s, "1"))
really_do_swap_account = 1;
else if (!strcmp(s, "0"))
really_do_swap_account = 0;
return 1;
}
-__setup("swapaccount=", enable_swap_account);
+__setup("swapaccount", enable_swap_account);
static void __init memsw_file_init(void)
{
--
1.8.3.2
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2013-08-14 13:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 13:21 Gergely Risko [this message]
2013-08-14 18:36 ` Michal Hocko
2013-08-14 18:49 ` Michal Hocko
2013-08-14 21:22 ` Gergely Risko
2013-08-15 7:47 ` Michal Hocko
2013-08-15 9:01 ` Gergely Risko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376486495-21457-1-git-send-email-gergely@risko.hu \
--to=gergely@risko.hu \
--cc=cgroups@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox