]> 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, 7 Sep 2012 00:18:00 +0000 (10:18 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Sep 2012 05:36:08 +0000 (15:36 +1000)
commitcd35db5e4009f8fa1c74898253a7a287d7dbce17
treeabb45857e192bcd9da84569ad5b2a27a04c40618
parent71ca29f530acad0df1693811e406308cc7522ce9
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