Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp616535pxb; Tue, 15 Feb 2022 23:56:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxU9TG9tfJJFtjaA32a+ZEg6eRrJO+77tDHcIQUs1BS5uaBuYf/WvLpxmDhdNS7/lNz/Nen X-Received: by 2002:a17:90a:3f09:b0:1b8:e615:a261 with SMTP id l9-20020a17090a3f0900b001b8e615a261mr384400pjc.196.1644998192474; Tue, 15 Feb 2022 23:56:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644998192; cv=none; d=google.com; s=arc-20160816; b=pX1BjZT5fZ0vDuIS56zuXo2p3fJNb7P7hEZEKjoF2Qf6PEq7PHs1WKZrwgLJKjWb9N Ey730LzeQcKg4+skyGvy67IJl0cqW+EUpHRhkKvINMyIy+Z0Kwo7QGkFQ1MQtgKmsCZr 9IDU58RblINlQPiMRvLs6R3IwWaURpJNodFoOrkjRtvrG4weHDUpE0pfTMVg7GvlwqhL gwpf5+firH23pPHVgnFMhMUuvM05Mg+KARfn/Coan8Mm+s4yQLZmf5ytzbOcVh9rm0t9 NMIgk4SG7ZVJNcjGCVt7+vfXgdJUdJ3nzU6sIM+Yr02IvX23XMA3JyPJZdcCx/EiOpCd UJVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:user-agent:date:message-id:subject:from:cc:to; bh=Z8B7B1R94857s6RitEkoCRXTcbanQXPcNz1B2dpA5X0=; b=aJE1LtUCBxZznoAZoU6qdylDkAb3SzA+iovccpCJYQqM9Dnw7HByTdyias0Rzb7NAQ wyOJgYeRMN8oczsJbfFRM8rks+GvL02UsmV43SnZnzuQMgcb8XVgM8GdRXubB2FCcDfi i7L29PM1i7ak2YXbO2Huqbn1egU5cWFzTx0aG2VcC4hu42UNX8WL0jiajlhPyK1Xua9F dZhmKsHrCluV2KYOeooyfIHbRS2+QCodosbNvVHsP/5duZV6r2wKNrVky7j7GZYuH8Qh xKGzvzyGfVfs5Ubplr2o4dpN+hobndoGLYQ1IhAlbg6G6Kj9OlAJ+88ajAH/WpRokm/x 0Z2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id oc18si14302461pjb.135.2022.02.15.23.56.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 23:56:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D38A06D1BE; Tue, 15 Feb 2022 23:26:07 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230017AbiBPH0Q (ORCPT + 99 others); Wed, 16 Feb 2022 02:26:16 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229796AbiBPH0N (ORCPT ); Wed, 16 Feb 2022 02:26:13 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E565C2FFE4 for ; Tue, 15 Feb 2022 23:26:01 -0800 (PST) Received: from kwepemi100013.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Jz7Wg3bzBzcbYP; Wed, 16 Feb 2022 14:35:59 +0800 (CST) Received: from kwepemm600003.china.huawei.com (7.193.23.202) by kwepemi100013.china.huawei.com (7.221.188.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 16 Feb 2022 14:37:05 +0800 Received: from [127.0.0.1] (10.174.177.249) by kwepemm600003.china.huawei.com (7.193.23.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 16 Feb 2022 14:37:04 +0800 To: , Mike Snitzer CC: , "linux-kernel@vger.kernel.org" , linfeilong , lixiaokeng , wuguanghao From: Zhiqiang Liu Subject: [PATCH] md: remove unused dm_thin_remove_block() Message-ID: Date: Wed, 16 Feb 2022 14:37:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.249] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-kernel@vger.kernel.org dm_thin_remove_block() is no longer unused, just remove it. Signed-off-by: Zhiqiang Liu --- drivers/md/dm-thin-metadata.c | 12 ------------ drivers/md/dm-thin-metadata.h | 1 - 2 files changed, 13 deletions(-) diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c index 1a96a07cbf44..986a2dc9a686 100644 --- a/drivers/md/dm-thin-metadata.c +++ b/drivers/md/dm-thin-metadata.c @@ -1740,18 +1740,6 @@ static int __remove_range(struct dm_thin_device *td, dm_block_t begin, dm_block_ return dm_btree_insert(&pmd->tl_info, pmd->root, keys, &value, &pmd->root); } -int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block) -{ - int r = -EINVAL; - - pmd_write_lock(td->pmd); - if (!td->pmd->fail_io) - r = __remove(td, block); - pmd_write_unlock(td->pmd); - - return r; -} - int dm_thin_remove_range(struct dm_thin_device *td, dm_block_t begin, dm_block_t end) { diff --git a/drivers/md/dm-thin-metadata.h b/drivers/md/dm-thin-metadata.h index 7ef56bd2a7e3..4d7a2caf21d9 100644 --- a/drivers/md/dm-thin-metadata.h +++ b/drivers/md/dm-thin-metadata.h @@ -166,7 +166,6 @@ int dm_pool_alloc_data_block(struct dm_pool_metadata *pmd, dm_block_t *result); int dm_thin_insert_block(struct dm_thin_device *td, dm_block_t block, dm_block_t data_block); -int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block); int dm_thin_remove_range(struct dm_thin_device *td, dm_block_t begin, dm_block_t end); -- 2.32.0