]> 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, 9 Nov 2012 03:03:55 +0000 (14:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 12 Nov 2012 04:16:52 +0000 (15:16 +1100)
commitaa7f113f6ca526f350b0c140017034def6714d2b
tree24726850e51f85edf8687f87a2690117b6282fa6
parent0c24d8a2a378e747869e673d142e91d4d20b6a77
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