mm: add swap cache interface for swap reference
[linux-2.6.git] / mm / vmscan.c
index 2c4b945..52339dd 100644 (file)
@@ -470,8 +470,7 @@ static int __remove_mapping(struct address_space *mapping, struct page *page)
                swp_entry_t swap = { .val = page_private(page) };
                __delete_from_swap_cache(page);
                spin_unlock_irq(&mapping->tree_lock);
-               mem_cgroup_uncharge_swapcache(page, swap);
-               swap_free(swap);
+               swapcache_free(swap, page);
        } else {
                __remove_from_page_cache(page);
                spin_unlock_irq(&mapping->tree_lock);