From 29f6e7f1744b8817c43b54e2b168d222a0db4d0c Mon Sep 17 00:00:00 2001 From: Naoya Horiguchi Date: Mon, 8 Oct 2012 16:33:47 -0700 Subject: [PATCH] --- yaml --- r: 332468 b: refs/heads/master c: 7a71932d5676b7410ab64d149bad8bde6b0d8632 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/proc/page.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index c8c820b019f5..f8a484f2a89f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cd8ed2a45a401cb692d769e92de7d73aa42fabce +refs/heads/master: 7a71932d5676b7410ab64d149bad8bde6b0d8632 diff --git a/trunk/fs/proc/page.c b/trunk/fs/proc/page.c index 7fcd0d60a968..b8730d9ebaee 100644 --- a/trunk/fs/proc/page.c +++ b/trunk/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; /*