]> git.baikalelectronics.ru Git - kernel.git/commit
iomap: Remove large folio handling in iomap_invalidate_folio()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 2 Jun 2023 22:09:11 +0000 (18:09 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:42:27 +0000 (09:42 +0200)
commit254c396da3a29e190ab60e260f99f561543e57d4
tree88036e6968fab40f66b5e6a5291104b1a5f0006e
parentb553ac4894e700c90b03f1875b5fa30d3c3cb326
iomap: Remove large folio handling in iomap_invalidate_folio()

[ Upstream commit a221ab717c43147f728d93513923ba3528f861bf ]

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: 60d8231089f0 ("iomap: Support large folios in invalidatepage")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/iomap/buffered-io.c