]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/slab: remove duplicate check
authorGavin Shan <shangw@linux.vnet.ibm.com>
Sat, 21 Jul 2012 00:53:53 +0000 (10:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Jul 2012 03:02:20 +0000 (13:02 +1000)
commit77e8344b73ac614d5d750a33aa508688bbf59a37
tree7f91ba2222b2cede0f56c62843f0ffb610443cbd
parent5a2769de77ee31e44df86f037b8596f1de2c6dca
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