From patchwork Wed Dec 15 16:41:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zackary Liu X-Patchwork-Id: 12678741 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA70FC433F5 for ; Wed, 15 Dec 2021 16:42:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F4756B0073; Wed, 15 Dec 2021 11:42:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A3C06B0074; Wed, 15 Dec 2021 11:42:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 592EA6B0075; Wed, 15 Dec 2021 11:42:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay034.a.hostedemail.com [64.99.140.34]) by kanga.kvack.org (Postfix) with ESMTP id 498B36B0073 for ; Wed, 15 Dec 2021 11:42:22 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 2387C304 for ; Wed, 15 Dec 2021 16:42:12 +0000 (UTC) X-FDA: 78920596104.03.1C386C4 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf06.hostedemail.com (Postfix) with ESMTP id 09817180011 for ; Wed, 15 Dec 2021 16:42:04 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id k4so20585837pgb.8 for ; Wed, 15 Dec 2021 08:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=twHkGtbZ/4TAT9UJF4rb85KYB1yDtANe5IeqA4O27RQ=; b=VSSHlZ4Cm1kE0LlkjpF79TezRsOcCbqa+waw7+xIKfNskBGTGbJVEhBUwBu/Dd0qWq 8pB5hOOdqLI/tP88lfQgzSBh4HKxKvfotIwI0ZUOxIqQDibLPdmzpDYW3U5XTj4WDeWg CvLSNkKXSCurFF01LAsFvUW8O4okUR3uNuf0VF52uELM/6qE7AIoMJzl/yWjWz+SsLKX QcqwSs3dAL5pw1PFR5BH3mUyqgG04DzxEcXkMlGSIOj8YEDvUzl5LCpkmDuTh3B6zlxj 2QoF7MHznUPUE99iKI1d1xhWKz8TNNHQYYSk9AuWD4BcDtQusj/1x+9lUt/qD2C4BS7w CfGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=twHkGtbZ/4TAT9UJF4rb85KYB1yDtANe5IeqA4O27RQ=; b=z46ASYtwkhr4k4UrBA/yy6ynBw4QpGpj/4lr0W5oy/dz5ygFO84fQ4eJSFRWrI/157 /DU2D1pOVEgB6f9T87FFKf1HZMPeBOiNBFTyS6ysdqZFixpHUhD76EVh3WkQ15JhHLwC uKVEwvjcxRXeKJjJY2dyOKZUEf1BdbYZtr/POHVm48S2o2YJuIfEWHM70sk1NFBJYvKJ Ch6AgYzMBnBhix5x3Sb2YAkDQDekwFQRxf+CyN5Nk3qtQmycCWMZCuS7fxb55MMcrHMR sJuMZlByV6rJKToS8W9VXNBPR1PuhVg8zgo3nBn6a6lOhYtTRC3GS+J6DmAWDYs8SMB3 vbSQ== X-Gm-Message-State: AOAM533qaLrbGVZr3zaf76wJq1FtCTvxMMqCjpf28JPrcQge0KY6t3Db T3eVWW81J5Oaj/1CV+z3vDI= X-Google-Smtp-Source: ABdhPJxZ3UqgJ8pfN51sBTuQJFzDf4hI4q1vnyZa3JBsW10ZCEg1+z1CMzXhc2M9Sv6XARCwVPlW5g== X-Received: by 2002:a63:e43:: with SMTP id 3mr8611068pgo.73.1639586524479; Wed, 15 Dec 2021 08:42:04 -0800 (PST) Received: from pc ([223.197.3.99]) by smtp.gmail.com with ESMTPSA id ot7sm6797174pjb.21.2021.12.15.08.42.01 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Dec 2021 08:42:03 -0800 (PST) Date: Thu, 16 Dec 2021 00:41:57 +0800 From: Zhaoyu Liu To: ddstreet@ieee.org, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] zpool: remove the list of pools_head Message-ID: <20211215163727.GA17196@pc> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 09817180011 X-Stat-Signature: insbpt9uu18cyxkqez1nkc7r6bxuhcgc Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VSSHlZ4C; spf=pass (imf06.hostedemail.com: domain of zackary.liu.pro@gmail.com designates 209.85.215.194 as permitted sender) smtp.mailfrom=zackary.liu.pro@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1639586524-644040 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The list of pools_head is no longer needed because the caller has been deleted in commit 479305fd7172 ("zpool: remove zpool_evict()"). Signed-off-by: Zhaoyu Liu --- mm/zpool.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/mm/zpool.c b/mm/zpool.c index 6d9ed48141e5..68facc193496 100644 --- a/mm/zpool.c +++ b/mm/zpool.c @@ -24,16 +24,11 @@ struct zpool { const struct zpool_ops *ops; bool evictable; bool can_sleep_mapped; - - struct list_head list; }; static LIST_HEAD(drivers_head); static DEFINE_SPINLOCK(drivers_lock); -static LIST_HEAD(pools_head); -static DEFINE_SPINLOCK(pools_lock); - /** * zpool_register_driver() - register a zpool implementation. * @driver: driver to register @@ -195,10 +190,6 @@ struct zpool *zpool_create_pool(const char *type, const char *name, gfp_t gfp, pr_debug("created pool type %s\n", type); - spin_lock(&pools_lock); - list_add(&zpool->list, &pools_head); - spin_unlock(&pools_lock); - return zpool; } @@ -217,9 +208,6 @@ void zpool_destroy_pool(struct zpool *zpool) { pr_debug("destroying pool type %s\n", zpool->driver->type); - spin_lock(&pools_lock); - list_del(&zpool->list); - spin_unlock(&pools_lock); zpool->driver->destroy(zpool->pool); zpool_put_driver(zpool->driver); kfree(zpool);