]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/slab: remove duplicate check
authorGavin Shan <shangw@linux.vnet.ibm.com>
Tue, 14 Aug 2012 03:22:32 +0000 (13:22 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 24 Aug 2012 06:43:48 +0000 (16:43 +1000)
commit85f7299b2a117fc073b35afcd7309ce825b40ca2
tree1ea7a7e64e07be9f62bb211fec27bb1d959111d3
parentd1805b11f071833c515a99ed3b335b3d0ed1c02e
mm/slab: 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>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c