]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/swapfile.c
memcg: fix/change behavior of shared anon at moving task
[karo-tx-linux.git] / mm / swapfile.c
index b0c86e92f42cdbc8f1026820953796112d72283c..457b10baef59414f591fb0bfab2b54619c5209b0 100644 (file)
@@ -717,37 +717,6 @@ int free_swap_and_cache(swp_entry_t entry)
        return p != NULL;
 }
 
-#ifdef CONFIG_CGROUP_MEM_RES_CTLR
-/**
- * mem_cgroup_count_swap_user - count the user of a swap entry
- * @ent: the swap entry to be checked
- * @pagep: the pointer for the swap cache page of the entry to be stored
- *
- * Returns the number of the user of the swap entry. The number is valid only
- * for swaps of anonymous pages.
- * If the entry is found on swap cache, the page is stored to pagep with
- * refcount of it being incremented.
- */
-int mem_cgroup_count_swap_user(swp_entry_t ent, struct page **pagep)
-{
-       struct page *page;
-       struct swap_info_struct *p;
-       int count = 0;
-
-       page = find_get_page(&swapper_space, ent.val);
-       if (page)
-               count += page_mapcount(page);
-       p = swap_info_get(ent);
-       if (p) {
-               count += swap_count(p->swap_map[swp_offset(ent)]);
-               spin_unlock(&swap_lock);
-       }
-
-       *pagep = page;
-       return count;
-}
-#endif
-
 #ifdef CONFIG_HIBERNATION
 /*
  * Find the swap type that corresponds to given device (if any).