]> 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>
Mon, 20 Aug 2012 07:08:02 +0000 (17:08 +1000)
commit5060a577ee2e33c8c20e8f09333206224023f245
tree3d0668309efe1a2eef1c6d55ddaf3122e34fae15
parent7cee222d6571c6fcdbfb0cf0c5b10ebd7e4bb42a
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