Re: [PATCH v2 1/4] iomap: don't resubmit an ioend after ->writeback_submit() failed
From: Darrick J. Wong
Date: Thu Sep 24 2026 - 18:33:29 EST
On Thu, Sep 24, 2026 at 10:30:07PM +0200, Andrea Parri wrote:
> On Thu, Sep 24, 2026 at 11:49:10AM -0700, Darrick J. Wong wrote:
> > I looked around the codebase and saw that iomap_writepages also calls
> > ->writeback_submit. Does that need to null out wb_ctx?
> >
> > My guess is that none of the callers do anything with wpc after
> > iomap_writepages returns so it's not harming anyone, but we should drop
> > the stale context too, right?
>
> Your guess is right: that ->writeback_submit() call is the last thing
> iomap_writepages() does, and all of its callers (xfs, gfs2, zonefs,
> exfat, fuse, ntfs, ntfs3) have the wpc on the stack for that single
> call, so wb_ctx is never looked at again. Christoph made the same
> point on v1 [1], and the last paragraph of the commit message now
> spells it out.
>
> Clearing it there as well would be harmless but dead code, so I'd
> rather leave it out; happy to add it if you feel strongly about it.
>
> [1] https://lore.kernel.org/all/arITXTsUhrA0N-qr@xxxxxxxxxxxxx/
LOL ok thanks for the reminder. My brain is fried this week, in a good
way. ;)
--D
> Thanks!
> Andrea
>