]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge tag 'vfs-7.0-rc1.iomap' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 9 Feb 2026 23:08:16 +0000 (15:08 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 9 Feb 2026 23:08:16 +0000 (15:08 -0800)
Pull vfs iomap updates from Christian Brauner:

 - Erofs page cache sharing preliminaries:

   Plumb a void *private parameter through iomap_read_folio() and
   iomap_readahead() into iomap_iter->private, matching iomap DIO. Erofs
   uses this to replace a bogus kmap_to_page() call, as preparatory work
   for page cache sharing.

 - Fix for invalid folio access:

   Fix an invalid folio access when a folio without iomap_folio_state
   is fully submitted to the IO helper — the helper may call
   folio_end_read() at any time, so ctx->cur_folio must be invalidated
   after full submission.

* tag 'vfs-7.0-rc1.iomap' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  iomap: fix invalid folio access after folio_end_read()
  erofs: hold read context in iomap_iter if needed
  iomap: stash iomap read ctx in the private field of iomap_iter

1  2 
fs/erofs/data.c
fs/fuse/file.c
fs/iomap/buffered-io.c
include/linux/iomap.h

diff --cc fs/erofs/data.c
Simple merge
diff --cc fs/fuse/file.c
Simple merge
index fa48045e9f6d4973a8acb156f30ef4fa747a6ea2,867e8ac761c80c503396294d4b397234ed1480fd..1fe19b4ee2f4d32daf91797f9efbe37cab3aeda5
@@@ -549,13 -534,17 +543,21 @@@ static int iomap_read_folio_iter(struc
                        if (!*bytes_submitted)
                                iomap_read_init(folio);
                        ret = ctx->ops->read_folio_range(iter, ctx, plen);
 +                      if (ret < 0)
 +                              fserror_report_io(iter->inode,
 +                                                FSERR_BUFFERED_READ, pos,
 +                                                plen, ret, GFP_NOFS);
                        if (ret)
                                return ret;
                        *bytes_submitted += plen;
+                       /*
+                        * If the entire folio has been read in by the IO
+                        * helper, then the helper owns the folio and will end
+                        * the read on it.
+                        */
+                       if (*bytes_submitted == folio_len)
+                               ctx->cur_folio = NULL;
                }
  
                ret = iomap_iter_advance(iter, plen);
Simple merge