mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] delete from_swap_cache BUG_ONs
@ 2005-07-09  0:47 Hugh Dickins
  0 siblings, 0 replies; only message in thread
From: Hugh Dickins @ 2005-07-09  0:47 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Three of the four BUG_ONs in delete_from_swap_cache are immediately
repeated in __delete_from_swap_cache: delete those and add the one.
But perhaps mm/ is altogether overprovisioned with historic BUGs?

Signed-off-by: Hugh Dickins <hugh@veritas.com>
---

 mm/swap_state.c |    6 +-----
 1 files changed, 1 insertion(+), 5 deletions(-)

--- 2.6.13-rc2-mm1/mm/swap_state.c	2005-07-07 12:33:21.000000000 +0100
+++ linux/mm/swap_state.c	2005-07-07 18:40:36.000000000 +0100
@@ -123,6 +123,7 @@ void __delete_from_swap_cache(struct pag
 	BUG_ON(!PageLocked(page));
 	BUG_ON(!PageSwapCache(page));
 	BUG_ON(PageWriteback(page));
+	BUG_ON(PagePrivate(page));
 
 	radix_tree_delete(&swapper_space.page_tree, page->private);
 	page->private = 0;
@@ -195,11 +196,6 @@ void delete_from_swap_cache(struct page 
 {
 	swp_entry_t entry;
 
-	BUG_ON(!PageSwapCache(page));
-	BUG_ON(!PageLocked(page));
-	BUG_ON(PageWriteback(page));
-	BUG_ON(PagePrivate(page));
-  
 	entry.val = page->private;
 
 	write_lock_irq(&swapper_space.tree_lock);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-09  1:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-09  0:47 [PATCH] delete from_swap_cache BUG_ONs Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®