Re: [PATCH] iomap: prevent ioend merge when io_private differs
Ojaswin Mujoo <[email protected]>
| Newsgroups | org.kernel.vger.linux-xfs,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fsdevel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jul 13, 2026 at 03:42:06PM +0800, Zhang Yi wrote: > From: Zhang Yi <[email protected]> > > Different io_private values indicate distinct completion contexts that > must not be merged together, as this could leak or corrupt the private > data associated with each ioend. > > Signed-off-by: Zhang Yi <[email protected]> Looks good Yi, feel free to add Reviewed-by: Ojaswin Mujoo <[email protected]> Regards, ojaswin > --- > This is one more change for the ext4 conversion. > Disscussion Link: > https://lore.kernel.org/linux-ext4/[email protected]/ > > fs/iomap/ioend.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/iomap/ioend.c b/fs/iomap/ioend.c > index acf3cf98b23a..ba59570c0926 100644 > --- a/fs/iomap/ioend.c > +++ b/fs/iomap/ioend.c > @@ -380,6 +380,8 @@ static bool iomap_ioend_can_merge(struct iomap_ioend *ioend, > > if (ioend->io_bio.bi_status != next->io_bio.bi_status) > return false; > + if (ioend->io_private != next->io_private) > + return false; > if (next->io_flags & IOMAP_IOEND_BOUNDARY) > return false; > if ((ioend->io_flags & IOMAP_IOEND_NOMERGE_FLAGS) != > -- > 2.52.0 >