Skip to content

Commit

Permalink
[PATCH] delete from_swap_cache BUG_ONs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Sep 5, 2005
1 parent dae06ac commit 3279ffd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mm/swap_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3279ffd

Please sign in to comment.