Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5168644pxb; Wed, 19 Jan 2022 12:32:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/wvuS2SIW8Eg7haSzd/KbXdoxbHfzuxsDa3gNJm7VVERhdbkGUr9HEkd+7K3A3mDpkv5y X-Received: by 2002:a63:3715:: with SMTP id e21mr28377464pga.423.1642624353253; Wed, 19 Jan 2022 12:32:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642624353; cv=none; d=google.com; s=arc-20160816; b=KRu1FSb/P1xhaWTQ92w9FM6pLMvjZFJQNp7CIaLr5/WnoZL+lidysHcOPlfhIRbiKU mMVG8t4gsh+mfA2iTn8dMYYMeM8fgfF03xIR3BERQXNdhYwJ0n2s05fyJdTpLGRD1Loj bYEVQl4Aoc1c3lQvW543nkzaN1nFbPWXrD9a24aAeKuHoZ3xSNFSsD+hDgvtGRX8ShYe Q5nsyVaUOKucLVEeugrKGTUnSc9ne4JnPcKPr4nMvDrCcXgisUlsUtw6FMyazXZaigaZ 9pXYMZ5G5wKQ0bKFsLlMhdYsZtlfRhnthjE/z9Ywg3/x2XqbksIpqruXZe2zM56iJ6yP 3NxA== 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=RX0A67Z5lXd5GUygO0wrcZQvzaCMySR9CjBx906FeWo=; b=LODBA/CqFrXVDzgrdDiNS2ECvHC6+P6nhHQ3MIbb+JaQz1Nc+ZnvvmjSHAVRE7SBA7 AIhxC0p5X4Na33ANa7w5LNrGqcmBY2UuEAeZP8t+YqEEpjXP1+ML9zpbR/niSx0oZagQ lnKezU+WoB8H0h+zfiehzdlZOHCaZmjMb1sNoUQBquiF8Rm3demLO3egrZ1tjx3o5JLE XJfNZOO+Lelf7ii8I0WdpH/qXbb/Ob5PddX4oJVlma2yCW50SQm0mZuWCaSBko7iFrot Vh8sC7bLKNxbNBkQcE7QDzKc+WkgiFGaIAhnc8Zrvk7ycDY4gBv9MRKkWlKo1cFQY86W 9pOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=IsOgWQqM; 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 k186si859339pgd.525.2022.01.19.12.32.17; Wed, 19 Jan 2022 12:32:33 -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=IsOgWQqM; 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 S236113AbiARHVb (ORCPT + 99 others); Tue, 18 Jan 2022 02:21:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245070AbiARHUp (ORCPT ); Tue, 18 Jan 2022 02:20:45 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D351BC061746; Mon, 17 Jan 2022 23:20:37 -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=RX0A67Z5lXd5GUygO0wrcZQvzaCMySR9CjBx906FeWo=; b=IsOgWQqM0RaGunI1SaCITwAnqb RpbPQlarkaevYy0aX2Swx1quQ9t8AB62WCRMZjYW6SuVsikXkDcnaDhEznC8sI388BOxrjs8GsLT/ GW9QloSqKj0ccXbh/KCZlmgwRTGnnRlCqSWn/+IlPXwlbgxMN6IE2hAJYG4tJa2OchZm/pxRxKeTo 3jkIwzknvQl02ek9uCzvqJSMxXp00ch06L74ynIJH1rh1keoTo/OJzKhPWXhQZCCZq1ebVWSu4bV5 aH8Q/y0znAaQGAjAWmFBZBhOXDRxGBcw+wkD+OFf/TEeM34PxhIsl8SIssCM2WQaa8ZjDST8ZWZwe Y2IzxOhQ==; Received: from [2001:4bb8:184:72a4:a4a9:19c0:5242:7768] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9in9-000Zd8-0E; Tue, 18 Jan 2022 07:20:31 +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 Subject: [PATCH 13/19] block: move blk_next_bio to bio.c Date: Tue, 18 Jan 2022 08:19:46 +0100 Message-Id: <20220118071952.1243143-14-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220118071952.1243143-1-hch@lst.de> References: <20220118071952.1243143-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 --- 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 0d400ba2dbd18..43fb28ac6b44e 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