]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iomap: pass the correct len to fserror_report_io in __iomap_write_begin
authorChristoph Hellwig <hch@lst.de>
Wed, 10 Jun 2026 05:06:42 +0000 (07:06 +0200)
committerChristian Brauner <brauner@kernel.org>
Wed, 10 Jun 2026 07:23:46 +0000 (09:23 +0200)
len is size of the (larger) write request, plen is the range for which
the read failed here.

Fixes: a9d573ee88af ("iomap: report file I/O errors to the VFS")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260610050642.1906695-1-hch@lst.de
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/iomap/buffered-io.c

index d7b648421a70fa52fe70a379990458d67647332e..bcf4559e9aa7d4bcc4bca00aa908a561452e2838 100644 (file)
@@ -850,7 +850,7 @@ static int __iomap_write_begin(const struct iomap_iter *iter,
                        if (status < 0)
                                fserror_report_io(iter->inode,
                                                  FSERR_BUFFERED_READ, pos,
-                                                 len, status, GFP_NOFS);
+                                                 plen, status, GFP_NOFS);
                        if (status)
                                return status;
                }