patch-2.2.8 linux/mm/page_alloc.c
Next file: linux/net/TUNABLE
Previous file: linux/mm/mmap.c
Back to the patch index
Back to the overall index
-  Lines: 19
-  Date:
Thu May  6 14:32:06 1999
-  Orig file: 
v2.2.7/linux/mm/page_alloc.c
-  Orig date: 
Wed Apr 28 11:37:32 1999
diff -u --recursive --new-file v2.2.7/linux/mm/page_alloc.c linux/mm/page_alloc.c
@@ -419,12 +419,12 @@
 		return;
 	}
 
-	/* The page is unshared, and we want write access.  In this
-	   case, it is safe to tear down the swap cache and give the
-	   page over entirely to this process. */
-
-	if (PageSwapCache(page_map))
-		delete_from_swap_cache(page_map);
+	/*
+	 * The page is unshared and we're going to dirty it - so tear
+	 * down the swap cache and give exclusive access to the page to
+	 * this process.
+	 */
+	delete_from_swap_cache(page_map);
 	set_pte(page_table, pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))));
   	return;
 }
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)