]> 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>
Wed, 26 Sep 2012 05:41:35 +0000 (15:41 +1000)
commitf554d3313b9bfa3361e14bc87514617c61c77178
treec3c7ad74b49f28318c0b3ace0dde98285d53ee26
parent1a8a240db6d2b1db7430e52de7db2ce54b1b1537
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