Merge branch 'akpm' (patches from Andrew)
[linux-2.6-microblaze.git] / include / linux / page-flags.h
index 0a51dd1..a558d67 100644 (file)
@@ -634,43 +634,6 @@ static inline int PageTransCompound(struct page *page)
        return PageCompound(page);
 }
 
-/*
- * PageTransCompoundMap is the same as PageTransCompound, but it also
- * guarantees the primary MMU has the entire compound page mapped
- * through pmd_trans_huge, which in turn guarantees the secondary MMUs
- * can also map the entire compound page. This allows the secondary
- * MMUs to call get_user_pages() only once for each compound page and
- * to immediately map the entire compound page with a single secondary
- * MMU fault. If there will be a pmd split later, the secondary MMUs
- * will get an update through the MMU notifier invalidation through
- * split_huge_pmd().
- *
- * Unlike PageTransCompound, this is safe to be called only while
- * split_huge_pmd() cannot run from under us, like if protected by the
- * MMU notifier, otherwise it may result in page->_mapcount check false
- * positives.
- *
- * We have to treat page cache THP differently since every subpage of it
- * would get _mapcount inc'ed once it is PMD mapped.  But, it may be PTE
- * mapped in the current process so comparing subpage's _mapcount to
- * compound_mapcount to filter out PTE mapped case.
- */
-static inline int PageTransCompoundMap(struct page *page)
-{
-       struct page *head;
-
-       if (!PageTransCompound(page))
-               return 0;
-
-       if (PageAnon(page))
-               return atomic_read(&page->_mapcount) < 0;
-
-       head = compound_head(page);
-       /* File THP is PMD mapped and not PTE mapped */
-       return atomic_read(&page->_mapcount) ==
-              atomic_read(compound_mapcount_ptr(head));
-}
-
 /*
  * PageTransTail returns true for both transparent huge pages
  * and hugetlbfs pages, so it should only be called when it's known
@@ -817,6 +780,15 @@ static inline int PageSlabPfmemalloc(struct page *page)
        return PageActive(page);
 }
 
+/*
+ * A version of PageSlabPfmemalloc() for opportunistic checks where the page
+ * might have been freed under us and not be a PageSlab anymore.
+ */
+static inline int __PageSlabPfmemalloc(struct page *page)
+{
+       return PageActive(page);
+}
+
 static inline void SetPageSlabPfmemalloc(struct page *page)
 {
        VM_BUG_ON_PAGE(!PageSlab(page), page);