]> Pileus Git - ~andy/linux/blobdiff - fs/proc/page.c
Merge tag 'microblaze-3.14-rc1' of git://git.monstr.eu/linux-2.6-microblaze
[~andy/linux] / fs / proc / page.c
index b8730d9ebaee651244d0d7e46e687792b46b0c9f..02174a610315ebb218880a8744e05b2244b6d26f 100644 (file)
@@ -118,10 +118,12 @@ u64 stable_page_flags(struct page *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.
+        * just checks PG_head/PG_tail, so we need to check PageLRU/PageAnon
+        * to make sure a given page is a thp, not a non-huge compound page.
         */
-       else if (PageTransCompound(page) && PageLRU(compound_trans_head(page)))
+       else if (PageTransCompound(page) &&
+                (PageLRU(compound_trans_head(page)) ||
+                 PageAnon(compound_trans_head(page))))
                u |= 1 << KPF_THP;
 
        /*
@@ -217,4 +219,4 @@ static int __init proc_page_init(void)
        proc_create("kpageflags", S_IRUSR, NULL, &proc_kpageflags_operations);
        return 0;
 }
-module_init(proc_page_init);
+fs_initcall(proc_page_init);