Merge branch 'akpm' (patches from Andrew)
[linux-2.6-microblaze.git] / include / linux / memcontrol.h
index 0131e55..b72d751 100644 (file)
@@ -538,45 +538,6 @@ static inline bool folio_memcg_kmem(struct folio *folio)
        return folio->memcg_data & MEMCG_DATA_KMEM;
 }
 
-/*
- * page_objcgs - get the object cgroups vector associated with a page
- * @page: a pointer to the page struct
- *
- * Returns a pointer to the object cgroups vector associated with the page,
- * or NULL. This function assumes that the page is known to have an
- * associated object cgroups vector. It's not safe to call this function
- * against pages, which might have an associated memory cgroup: e.g.
- * kernel stack pages.
- */
-static inline struct obj_cgroup **page_objcgs(struct page *page)
-{
-       unsigned long memcg_data = READ_ONCE(page->memcg_data);
-
-       VM_BUG_ON_PAGE(memcg_data && !(memcg_data & MEMCG_DATA_OBJCGS), page);
-       VM_BUG_ON_PAGE(memcg_data & MEMCG_DATA_KMEM, page);
-
-       return (struct obj_cgroup **)(memcg_data & ~MEMCG_DATA_FLAGS_MASK);
-}
-
-/*
- * page_objcgs_check - get the object cgroups vector associated with a page
- * @page: a pointer to the page struct
- *
- * Returns a pointer to the object cgroups vector associated with the page,
- * or NULL. This function is safe to use if the page can be directly associated
- * with a memory cgroup.
- */
-static inline struct obj_cgroup **page_objcgs_check(struct page *page)
-{
-       unsigned long memcg_data = READ_ONCE(page->memcg_data);
-
-       if (!memcg_data || !(memcg_data & MEMCG_DATA_OBJCGS))
-               return NULL;
-
-       VM_BUG_ON_PAGE(memcg_data & MEMCG_DATA_KMEM, page);
-
-       return (struct obj_cgroup **)(memcg_data & ~MEMCG_DATA_FLAGS_MASK);
-}
 
 #else
 static inline bool folio_memcg_kmem(struct folio *folio)
@@ -584,15 +545,6 @@ static inline bool folio_memcg_kmem(struct folio *folio)
        return false;
 }
 
-static inline struct obj_cgroup **page_objcgs(struct page *page)
-{
-       return NULL;
-}
-
-static inline struct obj_cgroup **page_objcgs_check(struct page *page)
-{
-       return NULL;
-}
 #endif
 
 static inline bool PageMemcgKmem(struct page *page)