Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp698547rwe; Thu, 1 Sep 2022 06:27:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ru8rkeOJkuMC8Ye9L2aHmV5JyNVRGT/44JG4fZYrxD3iL+v6Lb0Ssrey3N30mpIfJs6ph X-Received: by 2002:a17:906:3197:b0:73d:5e1a:44ac with SMTP id 23-20020a170906319700b0073d5e1a44acmr23355265ejy.512.1662038837567; Thu, 01 Sep 2022 06:27:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662038837; cv=none; d=google.com; s=arc-20160816; b=kPMnzh1rgAVCYXBBu0EDi/wVYb3dTakROhiS5ywTz/Z2G3PMb//kQa3AgFSDEc8j/P X0VLrfwrq7xHMQ9oF8cX1STpR2EQeStUUMKpQ6TRFRCmxVVmPrAfa/S45IFgr/oZBERS /HbAWdlvBiB4BZTyjI7lGDghhLjE8ASKeJBSVmeG2a7Fk0palwdkg0LTSX6qy+3lzGPp w9SOCJRCOwIQS1fBOg7eVGRgD8xwuIcmE5bhvFFh5XaF+iQLtOx12jFiXGFTZaYXwPA8 GkkGTEycFJO57unIwn9kgDlxyyNApX91x7FKLLcXgbDSArudiZrGvhhheN39mVc9qTpq KOmw== 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; bh=/P+NMAByEpipvLVjB0ZVAUu0eYpNCbvj+IFXz5HwgWA=; b=i2bkxVxZb5D49s26IVu72KFnd/thn5UPQ4EvmdoJH9EFN+xiKxZ994KSir8Dr6MvzQ v5daF4Mhw+DBcDgRjIXFTax3rkEJgwnDYppfmGVQPmdSrPALmK5p553fmqxrlDMB4o1Z seHC3xSQiq+Bwuj4987saKJaiJUuJevqLClE6+5tqSvbwlMPU5e5AsdpA0Rq7Csdrk08 p/tY/OhqDy1pFeTphWjwG0hC6yt9XdArKlKAJ6O09/4pktL8ZffnCQ8cjfmrwbWUEgJI B8n85R7pJJx8NtZlyOD6Qsi/VwYnXe5/0yEeQhF/7QPQ9lAj3g8nCrTGGrnDB0uiEz/X 2yRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f7-20020a056402354700b004483adcde8fsi1916640edd.43.2022.09.01.06.26.51; Thu, 01 Sep 2022 06:27:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234386AbiIAN0U (ORCPT + 99 others); Thu, 1 Sep 2022 09:26:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234385AbiIANYd (ORCPT ); Thu, 1 Sep 2022 09:24:33 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4580813D5B; Thu, 1 Sep 2022 06:24:13 -0700 (PDT) Received: from canpemm500005.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MJM9T646DzkWrK; Thu, 1 Sep 2022 21:20:29 +0800 (CST) Received: from huawei.com (10.175.127.227) by canpemm500005.china.huawei.com (7.192.104.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 1 Sep 2022 21:24:09 +0800 From: Zhang Yi To: , , , , , , , CC: , , , , , , , , , , , , Subject: [PATCH v2 14/14] fs/buffer: remove bh_submit_read() helper Date: Thu, 1 Sep 2022 21:35:05 +0800 Message-ID: <20220901133505.2510834-15-yi.zhang@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220901133505.2510834-1-yi.zhang@huawei.com> References: <20220901133505.2510834-1-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500005.china.huawei.com (7.192.104.229) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org bh_submit_read() has no user anymore, just remove it. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara --- fs/buffer.c | 25 ------------------------- include/linux/buffer_head.h | 1 - 2 files changed, 26 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 2cccc7586b99..b4c9fff3ab6c 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -3025,31 +3025,6 @@ void __bh_read_batch(int nr, struct buffer_head *bhs[], } EXPORT_SYMBOL(__bh_read_batch); -/** - * bh_submit_read - Submit a locked buffer for reading - * @bh: struct buffer_head - * - * Returns zero on success and -EIO on error. - */ -int bh_submit_read(struct buffer_head *bh) -{ - BUG_ON(!buffer_locked(bh)); - - if (buffer_uptodate(bh)) { - unlock_buffer(bh); - return 0; - } - - get_bh(bh); - bh->b_end_io = end_buffer_read_sync; - submit_bh(REQ_OP_READ, bh); - wait_on_buffer(bh); - if (buffer_uptodate(bh)) - return 0; - return -EIO; -} -EXPORT_SYMBOL(bh_submit_read); - void __init buffer_init(void) { unsigned long nrpages; diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index b415d8bc2a09..9b6556d3f110 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -230,7 +230,6 @@ int submit_bh(blk_opf_t, struct buffer_head *); void write_boundary_block(struct block_device *bdev, sector_t bblock, unsigned blocksize); int bh_uptodate_or_lock(struct buffer_head *bh); -int bh_submit_read(struct buffer_head *bh); int __bh_read(struct buffer_head *bh, blk_opf_t op_flags, bool wait); void __bh_read_batch(int nr, struct buffer_head *bhs[], blk_opf_t op_flags, bool force_lock); -- 2.31.1