]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/page_alloc.c: remove duplicate check
authorGavin Shan <shangw@linux.vnet.ibm.com>
Fri, 28 Sep 2012 00:19:02 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 5 Oct 2012 04:00:44 +0000 (14:00 +1000)
commit766b545db2dad4408237c8898a289920eee9c40c
tree926c4aa76b9ad060e17adbec9249e7a0e3db06b1
parent9dc2f25436fd24c734ca8183a5f7ec88bd1080b0
mm/page_alloc.c: remove duplicate check

While allocating pages using buddy allocator, the compound page is
probably split up to free pages.  Under these circumstances, the compound
page should be destroyed by destroy_compound_page().  However, there is a
duplicate check to judge if the page is compound.

Remove the duplicate check since the compound_order() returns 0 when the
page doesn't have PG_head set in destroy_compound_page().  That is to say,
destroy_compound_page() needn't check PageHead().

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c