diff options
author | Hugh Dickins <hugh@veritas.com> | 2005-09-04 00:54:43 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 09:05:42 +0200 |
commit | 3279ffd97f1b3962e40d3c5f09495ef8320b180b (patch) | |
tree | 56c72808c731a73fd50f3df37fd3af770812a7ee /mm/swap_state.c | |
parent | [PATCH] swap: update swsusp use of swap_info (diff) | |
download | linux-3279ffd97f1b3962e40d3c5f09495ef8320b180b.tar.xz linux-3279ffd97f1b3962e40d3c5f09495ef8320b180b.zip |
[PATCH] delete from_swap_cache BUG_ONs
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>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/swap_state.c')
-rw-r--r-- | mm/swap_state.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/mm/swap_state.c b/mm/swap_state.c index 4f251775ef90..029e56eb5e77 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -124,6 +124,7 @@ void __delete_from_swap_cache(struct page *page) 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; @@ -196,11 +197,6 @@ void delete_from_swap_cache(struct page *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); |