From ef643bfef41f6c463cf8e387903967c9f645f758 Mon Sep 17 00:00:00 2001 From: Dean Nelson Date: Wed, 21 Mar 2012 16:34:05 -0700 Subject: [PATCH] --- yaml --- r: 292648 b: refs/heads/master c: 385de35722c9a22917e7bc5e63cd83a8cffa5ecd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/page-flags.h | 20 ++++++++++++++++++++ trunk/mm/memory-failure.c | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index f6d748ec2051..46511ca6609b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6d9d88d07e132259c35f9493b15429e19198489c +refs/heads/master: 385de35722c9a22917e7bc5e63cd83a8cffa5ecd diff --git a/trunk/include/linux/page-flags.h b/trunk/include/linux/page-flags.h index e90a673be67e..6b25758e028e 100644 --- a/trunk/include/linux/page-flags.h +++ b/trunk/include/linux/page-flags.h @@ -414,11 +414,26 @@ static inline int PageTransHuge(struct page *page) return PageHead(page); } +/* + * PageTransCompound returns true for both transparent huge pages + * and hugetlbfs pages, so it should only be called when it's known + * that hugetlbfs pages aren't involved. + */ static inline int PageTransCompound(struct page *page) { return PageCompound(page); } +/* + * PageTransTail returns true for both transparent huge pages + * and hugetlbfs pages, so it should only be called when it's known + * that hugetlbfs pages aren't involved. + */ +static inline int PageTransTail(struct page *page) +{ + return PageTail(page); +} + #else static inline int PageTransHuge(struct page *page) @@ -430,6 +445,11 @@ static inline int PageTransCompound(struct page *page) { return 0; } + +static inline int PageTransTail(struct page *page) +{ + return 0; +} #endif #ifdef CONFIG_MMU diff --git a/trunk/mm/memory-failure.c b/trunk/mm/memory-failure.c index 56080ea36140..c22076ffdd44 100644 --- a/trunk/mm/memory-failure.c +++ b/trunk/mm/memory-failure.c @@ -1063,7 +1063,7 @@ int __memory_failure(unsigned long pfn, int trapno, int flags) * The check (unnecessarily) ignores LRU pages being isolated and * walked by the page reclaim code, however that's not a big loss. */ - if (!PageHuge(p) && !PageTransCompound(p)) { + if (!PageHuge(p) && !PageTransTail(p)) { if (!PageLRU(p)) shake_page(p, 0); if (!PageLRU(p)) {