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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Apr 2011 23:06:56 +0000 (16:06 -0700)
commite27e6151b154ff6e5e8162efa291bc60196d29ea
tree0dfef44a7e7e888ff6fe696058b40c458429ca75
parentb836aec53e2bce71de1d5415313380688c851477
mm/thp: use conventional format for boolean attributes

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>
Cc: <stable@kernel.org> [2.6.38.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/huge_memory.c