patch-1.3.83 linux/mm/vmscan.c

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

diff -u --recursive --new-file v1.3.82/linux/mm/vmscan.c linux/mm/vmscan.c
@@ -110,8 +110,9 @@
 			if (!(entry = get_swap_page()))
 				return 0;
 			vma->vm_mm->rss--;
+			flush_cache_page(vma, address);
 			set_pte(page_table, __pte(entry));
-			invalidate_page(vma, address);
+			flush_tlb_page(vma, address);
 			tsk->nswap++;
 			rw_swap_page(WRITE, entry, (char *) page, wait);
 		}
@@ -125,14 +126,16 @@
 			return 0;
 		}
 		vma->vm_mm->rss--;
+		flush_cache_page(vma, address);
 		set_pte(page_table, __pte(entry));
-		invalidate_page(vma, address);
+		flush_tlb_page(vma, address);
 		free_page(page);
 		return 1;
 	} 
 	vma->vm_mm->rss--;
+	flush_cache_page(vma, address);
 	pte_clear(page_table);
-	invalidate_page(vma, address);
+	flush_tlb_page(vma, address);
 	entry = page_unuse(page);
 	free_page(page);
 	return entry;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this