Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3503784pxb; Mon, 24 Jan 2022 10:56:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/vaTGCojKgKBYRh6hy6jj8K8Oiu8Cq+v/FUa73Vz++zHMV53EfJptu59Te+KPsz/eoV/t X-Received: by 2002:a62:33c7:0:b0:4bd:5aa4:1220 with SMTP id z190-20020a6233c7000000b004bd5aa41220mr14937094pfz.55.1643050588311; Mon, 24 Jan 2022 10:56:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643050588; cv=none; d=google.com; s=arc-20160816; b=b3RwDnMw5csPtb93N/nM9pXlNH5jhnVb2poEZuP+oy2HJehPpfz1RugsZwwY1W3n1U dDaNZtoV9pUsHDkmxCtEafz/OLHKCgFICiw9mObltrf3tw3VL463qnpHhc/ZG6zJcM8W Qz3EGMk8uJZRbSc7x6IDrLg0RDZHu/zplbAq2CZdAlDeY14G7X6ZD2K1P1hADsa3HTZX cQ53+M+fwsEdt1+sORakPFuteKW/SS0q+Hk5yevjlziIg25D6/4u/q3Ix5cVV4FcBoDB Vg6rQ2VELJnmH5jVhF7P7KlvBuKKwICZ278AD867wF3EqDfl99Vnlh2DNiOgTs5hht15 ZCeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=H757LVIKTEq+1tqMYPD2FmecyVVQJSjnAtYvboQfhHo=; b=BmnNTo5I4at39HOKOh3JFixjVHzhwyDbbI6faBg30CmGmTLnA/3cQD4ytNf07C/YRy rleWNcOZ7IW3OgNj/Du7Cg3EXmG97AfD0dk616GY+eRcM2reau/Cb6HamVllaTOCXFSb jaR0Cg4WBEHl9ZNxQjFwHT82QF1kycC+KGoL6hGuDXA4ns3kid8K+f2+8+8SJ/FbndOE 6mqBK2awzs69j3On6kftP7ussa83/QCJhCmoqEnIGICpk9I9uKwuwE8K6rl2xcDOP49g DhT3UrcbZl4zljMrXiXRNYKQB4qZ3ez9IJcRn30oJRP9srrEIZkqhNcB0V7K40BXKQ2C w1wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=GomJocQW; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ob7si168345pjb.143.2022.01.24.10.56.13; Mon, 24 Jan 2022 10:56:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=GomJocQW; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236733AbiAXJMY (ORCPT + 99 others); Mon, 24 Jan 2022 04:12:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236657AbiAXJLx (ORCPT ); Mon, 24 Jan 2022 04:11:53 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B10C6C061748; Mon, 24 Jan 2022 01:11:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=H757LVIKTEq+1tqMYPD2FmecyVVQJSjnAtYvboQfhHo=; b=GomJocQW08/7qSga4w2CIK+2BK FRgJe8mSaZskxJ8huGQ3GCdY9JE51mbqy6LTZP5/YJyxok+aR/+68blZ6+ZP+ajrQVextKMiV73s0 O3/szJPnf4HWKTQSvlC7KVDKo2hVtkQTucrUuFvorjuCiVuhrj8XVhvIBsZKv8JrOhI9rOjBBBy2q JrWeUnQsHk+x6KZcQgs8hS/8CS3knCeuA/DkOkGH2UwWPKz9zz/ha5JUjASlrdD6t3a5IhP8sdLfC 3lDTVz8uN3dxArIrTUsI2n0McDZIMinlI24UY/n3qYNCJVo4bo09GVt6hvdFf2RQsHbnPKVqo6S+s emR21HqQ==; Received: from [2001:4bb8:184:72a4:a337:a75f:a24e:7e39] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBvO5-002kIy-Ur; Mon, 24 Jan 2022 09:11:46 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Pavel Begunkov , Mike Snitzer , Ryusuke Konishi , Konstantin Komarov , Andrew Morton , "Md . Haris Iqbal " , Jack Wang , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Philipp Reisner , Lars Ellenberg , linux-block@vger.kernel.org, dm-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev, xen-devel@lists.xenproject.org, drbd-dev@lists.linbit.com, Chaitanya Kulkarni Subject: [PATCH 13/19] block: move blk_next_bio to bio.c Date: Mon, 24 Jan 2022 10:11:01 +0100 Message-Id: <20220124091107.642561-14-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124091107.642561-1-hch@lst.de> References: <20220124091107.642561-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Keep blk_next_bio next to the core bio infrastructure. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni --- block/bio.c | 13 +++++++++++++ block/blk-lib.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/block/bio.c b/block/bio.c index 4312a8085396b..1536579ed490a 100644 --- a/block/bio.c +++ b/block/bio.c @@ -344,6 +344,19 @@ void bio_chain(struct bio *bio, struct bio *parent) } EXPORT_SYMBOL(bio_chain); +struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp) +{ + struct bio *new = bio_alloc(gfp, nr_pages); + + if (bio) { + bio_chain(bio, new); + submit_bio(bio); + } + + return new; +} +EXPORT_SYMBOL_GPL(blk_next_bio); + static void bio_alloc_rescue(struct work_struct *work) { struct bio_set *bs = container_of(work, struct bio_set, rescue_work); diff --git a/block/blk-lib.c b/block/blk-lib.c index 9f09beadcbe30..9245b300ef73e 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -10,19 +10,6 @@ #include "blk.h" -struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp) -{ - struct bio *new = bio_alloc(gfp, nr_pages); - - if (bio) { - bio_chain(bio, new); - submit_bio(bio); - } - - return new; -} -EXPORT_SYMBOL_GPL(blk_next_bio); - int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, sector_t nr_sects, gfp_t gfp_mask, int flags, struct bio **biop) -- 2.30.2