summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoanne Koong <joannelkoong@gmail.com>2025-11-11 11:36:54 -0800
committerChristian Brauner <brauner@kernel.org>2025-11-12 10:50:32 +0100
commitf8eaf79406fe9415db0e7a5c175b50cb01265199 (patch)
tree1c97578fd801a25a8e93c509d5290218f1415630 /include
parent6b1fd2281fb0873ec56f8791d4e4898302070804 (diff)
iomap: simplify ->read_folio_range() error handling for reads
Instead of requiring that the caller calls iomap_finish_folio_read() even if the ->read_folio_range() callback returns an error, account for this internally in iomap instead, which makes the interface simpler and makes it match writeback's ->read_folio_range() error handling expectations. Signed-off-by: Joanne Koong <joannelkoong@gmail.com> Link: https://patch.msgid.link/20251111193658.3495942-6-joannelkoong@gmail.com Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/iomap.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index b49e47f069db..520e967cb501 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -495,9 +495,8 @@ struct iomap_read_ops {
/*
* Read in a folio range.
*
- * The caller is responsible for calling iomap_finish_folio_read() after
- * reading in the folio range. This should be done even if an error is
- * encountered during the read.
+ * If this succeeds, iomap_finish_folio_read() must be called after the
+ * range is read in, regardless of whether the read succeeded or failed.
*
* Returns 0 on success or a negative error on failure.
*/