]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bio: Fix bio_first_folio() for SPARSEMEM without VMEMMAP
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 12 Jun 2025 14:41:25 +0000 (15:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:24 +0000 (11:07 +0100)
commitb49429fd1eba5fd3a9bd8bf7e8e5f95ddc4a7f1f
treed408a83e0f93720a548be3d001088a30de022f81
parentb859b5f5c39b48e78e8176abfe6ffc17cacd1439
bio: Fix bio_first_folio() for SPARSEMEM without VMEMMAP

[ Upstream commit f826ec7966a63d48e16e0868af4e038bf9a1a3ae ]

It is possible for physically contiguous folios to have discontiguous
struct pages if SPARSEMEM is enabled and SPARSEMEM_VMEMMAP is not.
This is correctly handled by folio_page_idx(), so remove this open-coded
implementation.

Fixes: 640d1930bef4 (block: Add bio_for_each_folio_all())
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lore.kernel.org/r/20250612144126.2849931-1-willy@infradead.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/bio.h