patch-2.1.113 linux/mm/swap_state.c
Next file: linux/net/core/skbuff.c
Previous file: linux/mm/memory.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Wed Jul 29 14:18:02 1998
- Orig file:
v2.1.112/linux/mm/swap_state.c
- Orig date:
Tue Mar 17 22:18:15 1998
diff -u --recursive --new-file v2.1.112/linux/mm/swap_state.c linux/mm/swap_state.c
@@ -146,41 +146,22 @@
"on page %08lx\n", page_address(page));
}
/*
- * This will be a legal case once we have a more mature swap cache.
+ * This is a legal case, but warn about it.
*/
if (atomic_read(&page->count) == 1) {
- printk ("VM: Removing page cache on unshared page %08lx\n",
+ printk (KERN_WARNING
+ "VM: Removing page cache on unshared page %08lx\n",
page_address(page));
- return;
}
-
#ifdef DEBUG_SWAP
printk("DebugVM: remove_from_swap_cache(%08lx count %d)\n",
page_address(page), atomic_read(&page->count));
#endif
- remove_page_from_hash_queue (page);
- remove_page_from_inode_queue (page);
PageClearSwapCache (page);
- __free_page (page);
+ remove_inode_page(page);
}
-
-long find_in_swap_cache(struct page *page)
-{
-#ifdef SWAP_CACHE_INFO
- swap_cache_find_total++;
-#endif
- if (PageSwapCache (page)) {
- long entry = page->offset;
-#ifdef SWAP_CACHE_INFO
- swap_cache_find_success++;
-#endif
- remove_from_swap_cache (page);
- return entry;
- }
- return 0;
-}
int delete_from_swap_cache(struct page *page)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov