]> git.kernelconcepts.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>
Mon, 8 Oct 2012 02:59:50 +0000 (13:59 +1100)
commit7a0eab89d4d9689d436340403dbd53227fdc6d9a
tree2a53767b91ae47921db56a2de31022c6ad90326d
parente061de5eeeb14f000d0697a11f05eed487c2236a
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