Re: [PATCH] Revert "bcache: fix improper use of bi_end_io"

Kent Overstreet <[email protected]> Tue, 13 Jan 2026 03:30:41 -0500
Newsgroups org.kernel.vger.linux-bcache,org.kernel.vger.linux-block
Message-ID <[email protected]>
On Tue, Jan 13, 2026 at 12:07:54AM -0800, Christoph Hellwig wrote:
> On Tue, Jan 13, 2026 at 02:09:39PM +0800, [email protected] wrote:
> > From: Coly Li <[email protected]>
> > 
> > This reverts commit 53280e398471f0bddbb17b798a63d41264651325.
> > 
> > The above commit tries to address the race in bio chain handling,
> > but it seems in detached_dev_end_io() simply using bio_endio() to
> > replace bio->bi_end_io() may introduce potential regression.
> > 
> > This patch revert the commit, let's wait for better fix from Shida.
> 
> That's a pretty vague commit message for reverting a clear API
> violation that has caused trouble.  What is the story here?

Christoph, you can't call bio_endio() on the same bio twice. You should
know this. Calling a bare bi_end_io function is the correct thing to do
when we're getting called from bio_endio().