]> git.karo-electronics.de Git - karo-tx-linux.git/commit
thp: remove some code depend on CONFIG_NUMA
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Wed, 26 Sep 2012 01:33:22 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:25:56 +0000 (17:25 +1000)
commit36fa3c6cf7fec4d0a612dceb28d6254ee020f38b
treee9cad51673efb61aaccaae8df89be43b5f78ea30
parentad970fa91e99086a83b82f8b174157c1f196c71a
thp: remove some code depend on CONFIG_NUMA

If NUMA is disabled, hpage is used as page pre-alloc, so there are two
cases for hpage:

- it is !NULL, means the page is not consumed otherwise,
- the page has been consumed

If NUMA is enabled, hpage is just used as alloc-fail indicator which is
not a real page, NULL means not fail triggered.

So, we can release the page only if !IS_ERR_OR_NULL

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c