aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index b7749a92021c..7a7f3e0db738 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -409,9 +409,9 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask)
409{ 409{
410 int error; 410 int error;
411 411
412 VM_BUG_ON(!PageLocked(old)); 412 VM_BUG_ON_PAGE(!PageLocked(old), old);
413 VM_BUG_ON(!PageLocked(new)); 413 VM_BUG_ON_PAGE(!PageLocked(new), new);
414 VM_BUG_ON(new->mapping); 414 VM_BUG_ON_PAGE(new->mapping, new);
415 415
416 error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM); 416 error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM);
417 if (!error) { 417 if (!error) {
@@ -461,8 +461,8 @@ int add_to_page_cache_locked(struct page *page, struct address_space *mapping,
461{ 461{
462 int error; 462 int error;
463 463
464 VM_BUG_ON(!PageLocked(page)); 464 VM_BUG_ON_PAGE(!PageLocked(page), page);
465 VM_BUG_ON(PageSwapBacked(page)); 465 VM_BUG_ON_PAGE(PageSwapBacked(page), page);
466 466
467 error = mem_cgroup_cache_charge(page, current->mm, 467 error = mem_cgroup_cache_charge(page, current->mm,
468 gfp_mask & GFP_RECLAIM_MASK); 468 gfp_mask & GFP_RECLAIM_MASK);
@@ -607,7 +607,7 @@ EXPORT_SYMBOL_GPL(add_page_wait_queue);
607 */ 607 */
608void unlock_page(struct page *page) 608void unlock_page(struct page *page)
609{ 609{
610 VM_BUG_ON(!PageLocked(page)); 610 VM_BUG_ON_PAGE(!PageLocked(page), page);
611 clear_bit_unlock(PG_locked, &page->flags); 611 clear_bit_unlock(PG_locked, &page->flags);
612 smp_mb__after_clear_bit(); 612 smp_mb__after_clear_bit();
613 wake_up_page(page, PG_locked); 613 wake_up_page(page, PG_locked);
@@ -760,7 +760,7 @@ repeat:
760 page_cache_release(page); 760 page_cache_release(page);
761 goto repeat; 761 goto repeat;
762 } 762 }
763 VM_BUG_ON(page->index != offset); 763 VM_BUG_ON_PAGE(page->index != offset, page);
764 } 764 }
765 return page; 765 return page;
766} 766}
@@ -1656,7 +1656,7 @@ retry_find:
1656 put_page(page); 1656 put_page(page);
1657 goto retry_find; 1657 goto retry_find;
1658 } 1658 }
1659 VM_BUG_ON(page->index != offset); 1659 VM_BUG_ON_PAGE(page->index != offset, page);
1660 1660
1661 /* 1661 /*
1662 * We have a locked page in the page cache, now we need to check 1662 * We have a locked page in the page cache, now we need to check