patch-2.2.0-pre8 linux/mm/vmscan.c

Next file: linux/net/ipv4/ip_input.c
Previous file: linux/mm/vmalloc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre7/linux/mm/vmscan.c linux/mm/vmscan.c
@@ -126,10 +126,14 @@
 	 *
 	 * That would get rid of a lot of problems.
 	 */
+	flush_cache_page(vma, address);
 	if (vma->vm_ops && vma->vm_ops->swapout) {
 		pid_t pid = tsk->pid;
+		pte_clear(page_table);
+		flush_tlb_page(vma, address);
 		vma->vm_mm->rss--;
-		if (vma->vm_ops->swapout(vma, address - vma->vm_start + vma->vm_offset, page_table))
+		
+		if (vma->vm_ops->swapout(vma, page_map))
 			kill_proc(pid, SIGBUS, 1);
 		__free_page(page_map);
 		return 1;
@@ -147,7 +151,6 @@
 		
 	vma->vm_mm->rss--;
 	tsk->nswap++;
-	flush_cache_page(vma, address);
 	set_pte(page_table, __pte(entry));
 	flush_tlb_page(vma, address);
 	swap_duplicate(entry);	/* One for the process, one for the swap cache */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov