X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fproc%2Fpage.c;h=b8730d9ebaee651244d0d7e46e687792b46b0c9f;hb=b43b1ffa82aa0d4d13b5ebedcc743dfaa4c2a19f;hp=7fcd0d60a9680ae1eb4998633c51ea90e730209f;hpb=73bebc8bafb6a880a4db63d60bc4b8d9d6879c9e;p=~andy%2Flinux diff --git a/fs/proc/page.c b/fs/proc/page.c index 7fcd0d60a96..b8730d9ebae 100644 --- a/fs/proc/page.c +++ b/fs/proc/page.c @@ -115,7 +115,13 @@ u64 stable_page_flags(struct page *page) u |= 1 << KPF_COMPOUND_TAIL; if (PageHuge(page)) u |= 1 << KPF_HUGE; - else if (PageTransCompound(page)) + /* + * PageTransCompound can be true for non-huge compound pages (slab + * pages or pages allocated by drivers with __GFP_COMP) because it + * just checks PG_head/PG_tail, so we need to check PageLRU to make + * sure a given page is a thp, not a non-huge compound page. + */ + else if (PageTransCompound(page) && PageLRU(compound_trans_head(page))) u |= 1 << KPF_THP; /*