]> git.ipfire.org Git - thirdparty/linux.git/commit
erofs: hold read context in iomap_iter if needed
authorHongbo Li <lihongbo22@huawei.com>
Fri, 9 Jan 2026 10:28:48 +0000 (10:28 +0000)
committerChristian Brauner <brauner@kernel.org>
Wed, 14 Jan 2026 15:31:41 +0000 (16:31 +0100)
commit8d407bb32186f4a06a97871af4d5cc45444602fb
tree39801f60da8748aa44aae13f7aa0b3050118737b
parent8806f279244bf300dca2c99735d5a51cd24b86df
erofs: hold read context in iomap_iter if needed

Introduce `struct erofs_iomap_iter_ctx` to hold both `struct page *`
and `void *base`, avoiding bogus use of `kmap_to_page()` in
`erofs_iomap_end()`.

With this change, fiemap and bmap no longer need to read inline data.

Additionally, the upcoming page cache sharing mechanism requires
passing the backing inode pointer to `erofs_iomap_{begin,end}()`, as
I/O accesses must apply to backing inodes rather than anon inodes.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://patch.msgid.link/20260109102856.598531-3-lihongbo22@huawei.com
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/erofs/data.c