aboutsummaryrefslogtreecommitdiffstats
path: root/mm/truncate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/truncate.c')
-rw-r--r--mm/truncate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/truncate.c b/mm/truncate.c
index a01cce450a26..8d8c62d89e6d 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -283,7 +283,7 @@ void truncate_inode_pages_range(struct address_space *mapping,
283 283
284 if (!trylock_page(page)) 284 if (!trylock_page(page))
285 continue; 285 continue;
286 WARN_ON(page_to_pgoff(page) != index); 286 WARN_ON(page_to_index(page) != index);
287 if (PageWriteback(page)) { 287 if (PageWriteback(page)) {
288 unlock_page(page); 288 unlock_page(page);
289 continue; 289 continue;
@@ -371,7 +371,7 @@ void truncate_inode_pages_range(struct address_space *mapping,
371 } 371 }
372 372
373 lock_page(page); 373 lock_page(page);
374 WARN_ON(page_to_pgoff(page) != index); 374 WARN_ON(page_to_index(page) != index);
375 wait_on_page_writeback(page); 375 wait_on_page_writeback(page);
376 truncate_inode_page(mapping, page); 376 truncate_inode_page(mapping, page);
377 unlock_page(page); 377 unlock_page(page);
@@ -492,7 +492,7 @@ unsigned long invalidate_mapping_pages(struct address_space *mapping,
492 if (!trylock_page(page)) 492 if (!trylock_page(page))
493 continue; 493 continue;
494 494
495 WARN_ON(page_to_pgoff(page) != index); 495 WARN_ON(page_to_index(page) != index);
496 496
497 /* Middle of THP: skip */ 497 /* Middle of THP: skip */
498 if (PageTransTail(page)) { 498 if (PageTransTail(page)) {
@@ -612,7 +612,7 @@ int invalidate_inode_pages2_range(struct address_space *mapping,
612 } 612 }
613 613
614 lock_page(page); 614 lock_page(page);
615 WARN_ON(page_to_pgoff(page) != index); 615 WARN_ON(page_to_index(page) != index);
616 if (page->mapping != mapping) { 616 if (page->mapping != mapping) {
617 unlock_page(page); 617 unlock_page(page);
618 continue; 618 continue;