summaryrefslogtreecommitdiff
path: root/drivers/zorro
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2023-01-15 19:45:51 +0300
committerDarrick J. Wong <djwong@kernel.org>2023-01-18 21:44:04 +0300
commit80baab88bb93eeaa133b426d24dfc0775a8cf824 (patch)
tree4f40e8ce842c0a71f2b56c6454b77b76940c11ad /drivers/zorro
parent7a70a5085ed028b4fd132447cbaea9b73113bca9 (diff)
downloadlinux-80baab88bb93eeaa133b426d24dfc0775a8cf824.tar.xz
iomap/gfs2: Unlock and put folio in page_done handler
When an iomap defines a ->page_done() handler in its page_ops, delegate unlocking the folio and putting the folio reference to that handler. This allows to fix a race between journaled data writes and folio writeback in gfs2: before this change, gfs2_iomap_page_done() was called after unlocking the folio, so writeback could start writing back the folio's buffers before they could be marked for writing to the journal. Also, try_to_free_buffers() could free the buffers before gfs2_iomap_page_done() was done adding the buffers to the current current transaction. With this change, gfs2_iomap_page_done() adds the buffers to the current transaction while the folio is still locked, so the problems described above can no longer occur. The only current user of ->page_done() is gfs2, so other filesystems are not affected. To catch out any out-of-tree users, switch from a page to a folio in ->page_done(). Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'drivers/zorro')
0 files changed, 0 insertions, 0 deletions