Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86
[pandora-kernel.git] / mm / swap_state.c
index 7efcf15..b3d40dc 100644 (file)
@@ -78,7 +78,7 @@ void show_swap_cache_info(void)
  * __add_to_swap_cache resembles add_to_page_cache_locked on swapper_space,
  * but sets SwapCache flag and private instead of mapping and index.
  */
-static int __add_to_swap_cache(struct page *page, swp_entry_t entry)
+int __add_to_swap_cache(struct page *page, swp_entry_t entry)
 {
        int error;
        struct address_space *address_space;
@@ -160,7 +160,7 @@ void __delete_from_swap_cache(struct page *page)
  * Allocate swap space for the page and add the page to the
  * swap cache.  Caller needs to hold the page lock. 
  */
-int add_to_swap(struct page *page)
+int add_to_swap(struct page *page, struct list_head *list)
 {
        swp_entry_t entry;
        int err;
@@ -173,7 +173,7 @@ int add_to_swap(struct page *page)
                return 0;
 
        if (unlikely(PageTransHuge(page)))
-               if (unlikely(split_huge_page(page))) {
+               if (unlikely(split_huge_page_to_list(page, list))) {
                        swapcache_free(entry, NULL);
                        return 0;
                }