summaryrefslogtreecommitdiffstats
path: root/mm/swap_state.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
commitc7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch)
tree3682407a599b8f9f03fc096298134cafba1c9b2f /mm/swap_state.c
parent1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff)
o Merge with Linux 2.1.116.
o New Newport console code. o New G364 console code.
Diffstat (limited to 'mm/swap_state.c')
-rw-r--r--mm/swap_state.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/mm/swap_state.c b/mm/swap_state.c
index b91583340..401c7a1fc 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -146,42 +146,23 @@ void remove_from_swap_cache(struct page *page)
"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)
{
#ifdef SWAP_CACHE_INFO