diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2023-01-15 08:49:12 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-01-18 10:44:04 -0800 |
commit | 9060bc4d3aca6106bbe72891efba391d9d6b86e7 (patch) | |
tree | 8a7aa607ea3a76139022448beb015edfbeb360f9 /virt | |
parent | 98321b5139f92a736a426404fb6e23bfb8feb9cc (diff) |
iomap/gfs2: Get page in page_prepare handler
Change the iomap ->page_prepare() handler to get and return a locked
folio instead of doing that in iomap_write_begin(). This allows to
recover from out-of-memory situations in ->page_prepare(), which
eliminates the corresponding error handling code in iomap_write_begin().
The ->put_folio() handler now also isn't called with NULL as the folio
value anymore.
Filesystems are expected to use the iomap_get_folio() helper for getting
locked folios in their ->page_prepare() handlers.
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 'virt')
0 files changed, 0 insertions, 0 deletions