Skip to content

Commit a221ab7

Browse files
author
Matthew Wilcox (Oracle)
committed
iomap: Remove large folio handling in iomap_invalidate_folio()
We do not need to release the iomap_page in iomap_invalidate_folio() to allow the folio to be split. The splitting code will call ->release_folio() if there is still per-fs private data attached to the folio. At that point, we will check if the folio is still dirty and decline to release the iomap_page. It is possible to trigger the warning in perfectly legitimate circumstances (eg if a disk read fails, we do a partial write to the folio, then we truncate the folio), which will cause those writes to be lost. Fixes: 60d8231 ("iomap: Support large folios in invalidatepage") Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
1 parent 1b03069 commit a221ab7

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

fs/iomap/buffered-io.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,6 @@ void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len)
508508
WARN_ON_ONCE(folio_test_writeback(folio));
509509
folio_cancel_dirty(folio);
510510
iomap_page_release(folio);
511-
} else if (folio_test_large(folio)) {
512-
/* Must release the iop so the page can be split */
513-
WARN_ON_ONCE(!folio_test_uptodate(folio) &&
514-
folio_test_dirty(folio));
515-
iomap_page_release(folio);
516511
}
517512
}
518513
EXPORT_SYMBOL_GPL(iomap_invalidate_folio);

0 commit comments

Comments
 (0)