[PATCH] delete from_swap_cache BUG_ONs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---

 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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux