mm: swap: unify cluster-based and vma-based swap readahead
[muen/linux.git] / mm / memory.c
index bc1ccff795386f9dafdf091f51778ca224800ee8..01f5464e0fd28802753c0085e1d30f98a4557d3e 100644 (file)
@@ -2927,7 +2927,8 @@ int do_swap_page(struct vm_fault *vmf)
                if (si->flags & SWP_SYNCHRONOUS_IO &&
                                __swap_count(si, entry) == 1) {
                        /* skip swapcache */
-                       page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address);
+                       page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma,
+                                                       vmf->address);
                        if (page) {
                                __SetPageLocked(page);
                                __SetPageSwapBacked(page);
@@ -2936,12 +2937,8 @@ int do_swap_page(struct vm_fault *vmf)
                                swap_readpage(page, true);
                        }
                } else {
-                       if (swap_use_vma_readahead())
-                               page = do_swap_page_readahead(entry,
-                                       GFP_HIGHUSER_MOVABLE, vmf);
-                       else
-                               page = swapin_readahead(entry,
-                                      GFP_HIGHUSER_MOVABLE, vma, vmf->address);
+                       page = swapin_readahead(entry, GFP_HIGHUSER_MOVABLE,
+                                               vmf);
                        swapcache = page;
                }