diff options
Diffstat (limited to 'fs/nilfs2/page.c')
-rw-r--r-- | fs/nilfs2/page.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index 7b18be8cd47a..1bfbba9c0e9a 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c | |||
@@ -417,7 +417,7 @@ repeat: | |||
417 | dpage = find_lock_page(dmap, offset); | 417 | dpage = find_lock_page(dmap, offset); |
418 | if (dpage) { | 418 | if (dpage) { |
419 | /* override existing page on the destination cache */ | 419 | /* override existing page on the destination cache */ |
420 | BUG_ON(PageDirty(dpage)); | 420 | WARN_ON(PageDirty(dpage)); |
421 | nilfs_copy_page(dpage, page, 0); | 421 | nilfs_copy_page(dpage, page, 0); |
422 | unlock_page(dpage); | 422 | unlock_page(dpage); |
423 | page_cache_release(dpage); | 423 | page_cache_release(dpage); |
@@ -427,17 +427,15 @@ repeat: | |||
427 | /* move the page to the destination cache */ | 427 | /* move the page to the destination cache */ |
428 | spin_lock_irq(&smap->tree_lock); | 428 | spin_lock_irq(&smap->tree_lock); |
429 | page2 = radix_tree_delete(&smap->page_tree, offset); | 429 | page2 = radix_tree_delete(&smap->page_tree, offset); |
430 | if (unlikely(page2 != page)) | 430 | WARN_ON(page2 != page); |
431 | NILFS_PAGE_BUG(page, "page removal failed " | 431 | |
432 | "(offset=%lu, page2=%p)", | ||
433 | offset, page2); | ||
434 | smap->nrpages--; | 432 | smap->nrpages--; |
435 | spin_unlock_irq(&smap->tree_lock); | 433 | spin_unlock_irq(&smap->tree_lock); |
436 | 434 | ||
437 | spin_lock_irq(&dmap->tree_lock); | 435 | spin_lock_irq(&dmap->tree_lock); |
438 | err = radix_tree_insert(&dmap->page_tree, offset, page); | 436 | err = radix_tree_insert(&dmap->page_tree, offset, page); |
439 | if (unlikely(err < 0)) { | 437 | if (unlikely(err < 0)) { |
440 | BUG_ON(err == -EEXIST); | 438 | WARN_ON(err == -EEXIST); |
441 | page->mapping = NULL; | 439 | page->mapping = NULL; |
442 | page_cache_release(page); /* for cache */ | 440 | page_cache_release(page); /* for cache */ |
443 | } else { | 441 | } else { |