mm/thp: use conventional format for boolean attributes
authorBen Hutchings <ben@decadent.org.uk>
Thu, 14 Apr 2011 22:22:21 +0000 (15:22 -0700)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:42:07 +0000 (11:42 -0700)
commitba01c3c4995ebdf87d142247b69e25c619c089df
treea2a8ef1ba9478a9ea4aff0bb053cffc08705759a
parent15c18dbf762575b7e99c57da6ea168782ab45e4c
mm/thp: use conventional format for boolean attributes

BugLink: http://bugs.launchpad.net/bugs/769042

commit e27e6151b154ff6e5e8162efa291bc60196d29ea upstream.

The conventional format for boolean attributes in sysfs is numeric ("0" or
"1" followed by new-line).  Any boolean attribute can then be read and
written using a generic function.  Using the strings "yes [no]", "[yes]
no" (read), "yes" and "no" (write) will frustrate this.

[akpm@linux-foundation.org: use kstrtoul()]
[akpm@linux-foundation.org: test_bit() doesn't return 1/0, per Neil]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Johannes Weiner <jweiner@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Tested-by: David Rientjes <rientjes@google.com>
Cc: NeilBrown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
mm/huge_memory.c