Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp176532rwe; Wed, 31 Aug 2022 00:14:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR7tEAlibM5iWvsH2e4evSFW3COdgYR0hUcii1lgOv57iw8kHvf4qypee6WvYFC6XR/b4DSk X-Received: by 2002:a17:907:75db:b0:741:4155:b52f with SMTP id jl27-20020a17090775db00b007414155b52fmr13511705ejc.638.1661930071171; Wed, 31 Aug 2022 00:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661930071; cv=none; d=google.com; s=arc-20160816; b=guJkHm56W2KlqtAcq3vmNQih2Cu9sZB12HltsKPtwhn1DluxFMNnScd7JNMx1W4e5a G0BIg2ew0HZjCX1ccV7SC8Qs3XqiSA+Fhx68Qgg9OYhV+i22oAA4Z3l6rSpldCBn80Nm niqsQMByzxX/r2nY3zaE1efY3sVLVBdeteU+SKn6S3lEuTqMjcdQnEYzWxLiMn7OLduK naESESOpN11nLk2yOTOs2uhSDgGn1YtVfUsJj0G6hJguywGdOUjivJAX3MSkxI7AChh8 5CwFfSD1GJPuezY32AStdXXM+63yCDkS/a1XmHrJyKiiu78fhGwyfiiX6YJJRxGBPICM D9Sg== 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=Q5krNBVO1S5rfr19HG8exojtEgPK4INGXvOve2O1Ey4=; b=LsB0R9OEQYfs1aCacBmKurS3xMi0snYD0T9ml32EnwL0oJzVQF2cTEZtUNyjR8IXWW ubkN1zNydknQTuFZKZd6p5jNbQEKMvL3t3X75GiKiPeTqk1P41ZzLPo34ZrcY4bBrrSk 6dKA9YvhvQn/X/THCk3eGP/qUdGSjs6rx2ZqWmdAlE0psel1DOIAHSLZv3rT0diMnoBT aMBFsastjGvexUt58DpRlEFIBmO+e08cFzhvtAVdaV2aGcPhZWetdRZ9pPLvTnDxh7fe SFr6NOuS3Ee1Z788o773+ZRUVKr1Lep0AjhJYsOycdKFAyVKHWDwEos4v8OBCQCPJp86 7OTg== 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 ds22-20020a170907725600b0073d99832c34si5590888ejc.778.2022.08.31.00.14.06; Wed, 31 Aug 2022 00:14:31 -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 S231192AbiHaHMP (ORCPT + 99 others); Wed, 31 Aug 2022 03:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229698AbiHaHL2 (ORCPT ); Wed, 31 Aug 2022 03:11:28 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1D7A22516; Wed, 31 Aug 2022 00:10:16 -0700 (PDT) Received: from canpemm500005.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MHZwp4ZXNzlWfP; Wed, 31 Aug 2022 15:06:50 +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; Wed, 31 Aug 2022 15:10:14 +0800 From: Zhang Yi To: , , , , , , CC: , , , , , , , , , , , , , Subject: [PATCH 14/14] fs/buffer: remove bh_submit_read() helper Date: Wed, 31 Aug 2022 15:21:11 +0800 Message-ID: <20220831072111.3569680-15-yi.zhang@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220831072111.3569680-1-yi.zhang@huawei.com> References: <20220831072111.3569680-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 --- 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 d1d09e2dacc2..fa7c2dbcef4c 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -3029,31 +3029,6 @@ void __bh_read_batch(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 1c93ff8c8f51..576f3609ac4e 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(struct buffer_head *bhs[], int nr, blk_opf_t op_flags, bool force_lock); -- 2.31.1