]> 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>
Fri, 7 Sep 2012 00:23:39 +0000 (10:23 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Sep 2012 05:36:15 +0000 (15:36 +1000)
commit78710779f7018addda33e3e6d25d67093e3ec935
tree2086d80889f50143a55374e052c08700d06dedb6
parent41314ce7d19338381a76bc90faef2dcdc34a6a47
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