File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2857,8 +2857,11 @@ int do_swap_page(struct vm_fault *vmf)
28572857 int ret = 0 ;
28582858 bool vma_readahead = swap_use_vma_readahead ();
28592859
2860- if (vma_readahead )
2860+ if (vma_readahead ) {
28612861 page = swap_readahead_detect (vmf , & swap_ra );
2862+ swapcache = page ;
2863+ }
2864+
28622865 if (!pte_unmap_same (vma -> vm_mm , vmf -> pmd , vmf -> pte , vmf -> orig_pte )) {
28632866 if (page )
28642867 put_page (page );
@@ -2889,9 +2892,12 @@ int do_swap_page(struct vm_fault *vmf)
28892892
28902893
28912894 delayacct_set_flag (DELAYACCT_PF_SWAPIN );
2892- if (!page )
2895+ if (!page ) {
28932896 page = lookup_swap_cache (entry , vma_readahead ? vma : NULL ,
28942897 vmf -> address );
2898+ swapcache = page ;
2899+ }
2900+
28952901 if (!page ) {
28962902 struct swap_info_struct * si = swp_swap_info (entry );
28972903
You can’t perform that action at this time.
0 commit comments