[PATCH] delete from_swap_cache BUG_ONs
From: Hugh Dickins
Date: Fri Jul 08 2005 - 20:15:01 EST
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@xxxxxxxxxxx>
---
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/