summaryrefslogtreecommitdiff
path: root/include/linux/page-flags.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r--include/linux/page-flags.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 818fa39538a9..190f1915a097 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -176,7 +176,7 @@ static inline int PageCompound(struct page *page)
#define PF_NO_TAIL(page, enforce) ({ \
VM_BUG_ON_PGFLAGS(enforce && PageTail(page), page); \
compound_head(page);})
-#define PF_NO_COMPOUND(page, enforce) ({ \
+#define PF_NO_COMPOUND(page, enforce) ({ \
VM_BUG_ON_PGFLAGS(enforce && PageCompound(page), page); \
page;})
@@ -381,6 +381,7 @@ PAGEFLAG(Idle, idle, PF_ANY)
static inline int PageAnon(struct page *page)
{
+ page = compound_head(page);
return ((unsigned long)page->mapping & PAGE_MAPPING_ANON) != 0;
}
@@ -393,6 +394,7 @@ static inline int PageAnon(struct page *page)
*/
static inline int PageKsm(struct page *page)
{
+ page = compound_head(page);
return ((unsigned long)page->mapping & PAGE_MAPPING_FLAGS) ==
(PAGE_MAPPING_ANON | PAGE_MAPPING_KSM);
}