From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id 81D99163115 for ; Wed, 4 Mar 2026 20:10:52 +0100 (CET) From: Andreas Gruenbacher To: Jens Axboe Subject: [PATCH 3/4] bio: rename bio_chain arguments Date: Wed, 4 Mar 2026 20:04:08 +0100 Message-ID: <20260304190424.291743-4-agruenba@redhat.com> In-Reply-To: <20260304190424.291743-1-agruenba@redhat.com> References: <20260304190424.291743-1-agruenba@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Cc: dm-devel@lists.linux.dev, Andreas Gruenbacher , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Christoph Hellwig , drbd-dev@lists.linbit.com List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Use the same argument names in bio_chain() as in bio_chain_and_submit() to be consistent. Slightly improve the function description. Signed-off-by: Andreas Gruenbacher Reviewed-by: Christoph Hellwig --- block/bio.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/block/bio.c b/block/bio.c index eadf4c1e9994..5e60bf3730af 100644 --- a/block/bio.c +++ b/block/bio.c @@ -369,22 +369,22 @@ static void bio_chain_endio(struct bio *bio) /** * bio_chain - chain bio completions - * @bio: the target bio - * @parent: the parent bio of @bio + * @prev: the bio to chain + * @new: the bio to chain to * - * The caller won't have a bi_end_io called when @bio completes - instead, - * @parent's bi_end_io won't be called until both @parent and @bio have - * completed; the chained bio will also be freed when it completes. + * The caller won't have a bi_end_io called when @prev completes. Instead, + * @new's bi_end_io will be called once both @new and @prev have completed. + * Like an unchained bio, @prev will be put when it completes. * - * The caller must not set bi_private or bi_end_io in @bio. + * The caller must not set bi_private or bi_end_io in @prev. */ -void bio_chain(struct bio *bio, struct bio *parent) +void bio_chain(struct bio *prev, struct bio *new) { - BUG_ON(bio->bi_private || bio->bi_end_io); + BUG_ON(prev->bi_private || prev->bi_end_io); - bio->bi_private = parent; - bio->bi_end_io = bio_chain_endio; - bio_inc_remaining(parent); + prev->bi_private = new; + prev->bi_end_io = bio_chain_endio; + bio_inc_remaining(new); } EXPORT_SYMBOL(bio_chain); -- 2.52.0