public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: zhangshida <starzhangzsd@gmail.com>
Cc: Johannes.Thumshirn@wdc.com, hch@infradead.org,
	agruenba@redhat.com, ming.lei@redhat.com,
	hsiangkao@linux.alibaba.com, csander@purestorage.com,
	colyli@fnnas.com, linux-block@vger.kernel.org,
	linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org,
	zhangshida@kylinos.cn
Subject: Re: [PATCH v5 2/3] block: prohibit calls to bio_chain_endio
Date: Thu, 4 Dec 2025 01:40:14 -0800	[thread overview]
Message-ID: <aTFW_gdWmXmCP5fd@infradead.org> (raw)
In-Reply-To: <20251204024748.3052502-3-zhangshida@kylinos.cn>

On Thu, Dec 04, 2025 at 10:47:47AM +0800, zhangshida wrote:
> From: Shida Zhang <zhangshida@kylinos.cn>
> 
> Now that all potential callers of bio_chain_endio have been
> eliminated, completely prohibit any future calls to this function.
> 
> Suggested-by: Ming Lei <ming.lei@redhat.com>
> Suggested-by: Andreas Gruenbacher <agruenba@redhat.com>
> Suggested-by: Christoph Hellwig <hch@infradead.org>
> Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
> ---
>  block/bio.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/block/bio.c b/block/bio.c
> index b3a79285c27..cfb751dfcf5 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -320,9 +320,13 @@ static struct bio *__bio_chain_endio(struct bio *bio)
>  	return parent;
>  }
>  
> +/**
> + * This function should only be used as a flag and must never be called.
> + * If execution reaches here, it indicates a serious programming error.
> + */

This is not a kerneldoc comment and thus should not use /** to start
the comment, otherwise the kerneldoc script will complain about
missing kernel doc elelemts.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

  reply	other threads:[~2025-12-04  9:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04  2:47 [PATCH v5 0/3] Fix bio chain related issues zhangshida
2025-12-04  2:47 ` [PATCH v5 1/3] bcache: fix improper use of bi_end_io zhangshida
2025-12-04  9:38   ` Christoph Hellwig
2025-12-04  2:47 ` [PATCH v5 2/3] block: prohibit calls to bio_chain_endio zhangshida
2025-12-04  9:40   ` Christoph Hellwig [this message]
2025-12-06  9:26     ` Stephen Zhang
2025-12-04  2:47 ` [PATCH v5 3/3] block: prevent race condition on bi_status in __bio_chain_endio zhangshida
2025-12-04 12:01   ` Andreas Gruenbacher
2025-12-05  7:13     ` Stephen Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aTFW_gdWmXmCP5fd@infradead.org \
    --to=hch@infradead.org \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=agruenba@redhat.com \
    --cc=colyli@fnnas.com \
    --cc=csander@purestorage.com \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=starzhangzsd@gmail.com \
    --cc=zhangshida@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox