]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: stricter check in follow_huge_addr()
authorChristoph Lameter <clameter@sgi.com>
Thu, 27 Mar 2008 04:03:04 +0000 (21:03 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 27 Mar 2008 15:08:45 +0000 (16:08 +0100)
The first page of the compound page is determined in follow_huge_addr()
but then PageCompound() only checks if the page is part of a compound page.
PageHead() allows checking if this is indeed the first page of the
compound.

Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/hugetlbpage.c

index 4fbafb4bc2f02a93bfcbb64fa732fc08fb0af406..0b3d567e686df15c1b042deb388091ab78a6ae25 100644 (file)
@@ -178,7 +178,7 @@ follow_huge_addr(struct mm_struct *mm, unsigned long address, int write)
 
        page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)];
 
-       WARN_ON(!PageCompound(page));
+       WARN_ON(!PageHead(page));
 
        return page;
 }