mm: swap: unify cluster-based and vma-based swap readahead
[muen/linux.git] / mm / shmem.c
index b859192433998a14096629b53ac5297a6a0dd2bb..4424fc0c33aaf30e208a57e12e74dcf5d99afbd9 100644 (file)
@@ -1422,9 +1422,12 @@ static struct page *shmem_swapin(swp_entry_t swap, gfp_t gfp,
 {
        struct vm_area_struct pvma;
        struct page *page;
+       struct vm_fault vmf;
 
        shmem_pseudo_vma_init(&pvma, info, index);
-       page = swapin_readahead(swap, gfp, &pvma, 0);
+       vmf.vma = &pvma;
+       vmf.address = 0;
+       page = swap_cluster_readahead(swap, gfp, &vmf);
        shmem_pseudo_vma_destroy(&pvma);
 
        return page;