patch-2.3.99-pre7 linux/mm/page_io.c
Next file: linux/mm/slab.c
Previous file: linux/mm/page_alloc.c
Back to the patch index
Back to the overall index
-  Lines: 21
-  Date:
Fri May  5 12:47:48 2000
-  Orig file: 
v2.3.99-pre6/linux/mm/page_io.c
-  Orig date: 
Tue Dec  7 09:32:52 1999
diff -u --recursive --new-file v2.3.99-pre6/linux/mm/page_io.c linux/mm/page_io.c
@@ -74,7 +74,7 @@
 		return 0;
 	}
  	if (!wait) {
- 		set_bit(PG_decr_after, &page->flags);
+ 		SetPageDecrAfter(page);
  		atomic_inc(&nr_async_pages);
  	}
 
@@ -132,6 +132,11 @@
 		PAGE_BUG(page);
 	if (PageSwapCache(page))
 		PAGE_BUG(page);
+	if (page->mapping)
+		PAGE_BUG(page);
+	/* needs sync_page to wait I/O completation */
+	page->mapping = &swapper_space;
 	if (!rw_swap_page_base(rw, entry, page, wait))
 		UnlockPage(page);
+	page->mapping = NULL;
 }
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)