mm, compaction: more reliably increase direct compaction priority
[cascardo/linux.git] / mm / swapfile.c
index 134c085..2210de2 100644 (file)
@@ -105,7 +105,7 @@ __try_to_reclaim_swap(struct swap_info_struct *si, unsigned long offset)
        struct page *page;
        int ret = 0;
 
-       page = find_get_page(swap_address_space(entry), entry.val);
+       page = find_get_page(swap_address_space(entry), swp_offset(entry));
        if (!page)
                return 0;
        /*
@@ -1005,7 +1005,7 @@ int free_swap_and_cache(swp_entry_t entry)
        if (p) {
                if (swap_entry_free(p, entry, 1) == SWAP_HAS_CACHE) {
                        page = find_get_page(swap_address_space(entry),
-                                               entry.val);
+                                            swp_offset(entry));
                        if (page && !trylock_page(page)) {
                                put_page(page);
                                page = NULL;