From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0860606A698 for ; Thu, 3 Dec 2026 18:16:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=cK2udbhV Received: by kanga.kvack.org (Postfix) id 946CD6B05E4; Thu, 3 Dec 2026 13:16:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F7456B05E5; Thu, 3 Dec 2026 13:16:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7E5486B05E6; Thu, 3 Dec 2026 13:16:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 461136B05E4 for ; Thu, 3 Dec 2026 13:16:42 -0500 (EST) Received: from smtpin04.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay08.hostedemail.com (Postfix) with ESMTP id AF19D140823 for ; Thu, 3 Dec 2026 18:16:41 +0000 (UTC) X-FDA: 85503477402.04.6C27A19 Received: from mta0.migadu.com (out-139.mta0.migadu.com [91.218.175.139]) by imf26.hostedemail.com (Postfix) with ESMTP id 9F90514000C for ; Thu, 3 Dec 2026 18:16:39 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=cK2udbhV; spf=pass (imf26.hostedemail.com: domain of baoquan.he@linux.dev designates 91.218.175.139 as permitted sender) smtp.mailfrom=baoquan.he@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1796321799; b=qslablbYprgZVNIDZmKwMwaQ1qlJZbqyqgBC1PrcoQPTWTXQd8Un4kUA/gA4sF07zeONLH BARtpTZNN5viKJKRyz0lLCUSRzvpcf2NkuZkzvOa/L5otiNXv5i8detbjXQKevRWmtbwep hLZKMptICIIDwAcDzz8CR4qol0d8+Pk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1796321799; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=wNFEC4ctuf2Nd3zfH9AP//VxKH7llGWNFnGGp55bXLw=; b=cQoFic3M+9OKqcoHUC3DvfXgVw6wtUY+nDejPA8EtrinMkm6v3GmhjXojv2T6hrM2AYudz jwMNK/nUEJzuCqnvOpxGoc/LPB82HyhcZ4hGpHnDpqPcvyhe54VmSSzGS9OXFmXlJRrPIc 7wYIEIivPQwG219pF8fAT+iiLmSv8y0= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=cK2udbhV; spf=pass (imf26.hostedemail.com: domain of baoquan.he@linux.dev designates 91.218.175.139 as permitted sender) smtp.mailfrom=baoquan.he@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Envelope-To: linux-mm@kvack.org DKIM-Signature: a=rsa-sha256; bh=EFSugZl2hyIzDLVRH630KSxDPRmxH8GeHkn0mn3JYSs=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796321798; v=1; x=1796926598; b=cK2udbhVW0hxwz3gnSeOOAXSg6mBU/J/dSvlrax8kmNBWkTvmA6POwkPB9jUvKYGc3w6LhyV 6EP03gQv4JVa0ApFu0dEtbqwp0IicYR8nzTyhi5HlTqucpgQPb39p2shKvwfKH/adoxZXVHwcGa r3QaqL0XAXvZzv3+05H/0fEM= X-Envelope-To: linux-mm@kvack.org Received: by mta11.migadu.com with ESMTPS id 4fd32c3aa74197e2; Thu, 03 Dec 2026 18:16:38 +0000 X-Mizu-Trace-ID: 4fd32c3aa74197e2 X-Migadu-Flow: FLOW_OUT From: Baoquan He To: linux-mm@kvack.org Cc: akpm@linux-foundation.org, david@kernel.org, chrisl@kernel.org, kasong@tencent.com, hannes@cmpxchg.org, corbet@lwn.net, yosry@kernel.org, nphamcs@gmail.com, muchun.song@linux.dev, baohua@kernel.org, youngjun.park@lge.com, hughd@google.com, baolin.wang@linux.alibaba.com, baoquan.he@linux.dev, Baoquan He Subject: [PATCH v2 30/32] mm, zswap: index entries in the swap device's backend table Date: Fri, 4 Dec 2026 02:13:17 +0800 Message-ID: <20261203181319.901844-31-baoquan.he@linux.dev> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261203181319.901844-1-baoquan.he@linux.dev> References: <20261203181319.901844-1-baoquan.he@linux.dev> X-Archived-By: MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9F90514000C X-Stat-Signature: 645x6qyne1tr13pbepr76cfpfmbykjm1 X-Rspam-User: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Rspamd-Server: rspam06 X-HE-Tag: 1796321799-641670 X-HE-Meta: U2FsdGVkX1+dHvqgmX5biBrP7Frtxks7sdkCTdQqXOmHP/lH3FoIzwmyx8y48tAAMhXsQwi6y44iwE4oCUCHfV4hyQvXh/plmVuQfu01a3rQn2NeeIH8VOJi9U+Juy68tk28ioJK9lpbRu+2LUQ7avUzB/kIqZP4aO3JvsDRjxafB6+Y6/YdCSh6T9q0dHKBMmSW8Y0y6RayedfwvZmzUelgKEBU2GKlKwNMLf2VSgrqXUln3MSe+9CZh9v3N4u9Whjs2IC2ghHPsWLYIUe8qm5QGAGCm8Cx3j6XPb0/2F9mnKKcfMYrazrh/zKTnIzgwChl6dzhC+5gvtUGs+EewcLb7fvrsf0kEPX0mXaokiGZZLLrRSwAmDNOg6OfCeNZQiJrL0IlvGh9CyqPozwQRKFfWel7rp8k1i3BvoZa61pvj2+0VegAVZ8UVgpoz1HwGtXHlsBVPXDqBTucUkUOvXxzHbMZ2cKOWULwc49v+dOemdPysLu3C0GvafQtsLFUOfyMkCjEva16wxR7bdr53O/Ep+WggO3WdbF1wk0VshL6tqSAiRarowrjg2b/56jL0KxpeLFzZZFiTnMdFqXmezSLNzvszhg7XH3WIL8AvOkZqVf7jJUOygfNSxC0D9D/OSFDk7gHYeKZamBopo4Dlq6//AbIK8VRxUd6RO2evbtsjnwh6QEfba8uam0g6aJ+AdS+AW/OFv4SM0GL5DO84rg5zGWezpG1Gv0qSSc9eDxLkoBVvh33oKi2ofPljtc5XxFt1R70unsNgjAwhZNdWY5jJnqD+EBRRnlKaPuy3TgmYgr1INE7ZOwxWfzsdEE7yhQBPA/0SCEsiuT3nydJvwHSW2c6b8wkZNClavnSza7bb6wHLq3xGAqYlrl5vabXOHMAwVzX0GdD9hMvHV3e+vpxV01MRCe//Vci3ivkeXXaYz+ZQXyZgBXY8uHRw7t++nRaXKeE1XNu6cvkDTm EhYmskTO f67srB7Syc4YDGQ/d59oxjY6+7BC+gyvgq7EDc/Ox+tCquHIPfcT7lqIfOdG2pvnxnG5e6Lic7NsZ22cVrsRiQEJRP3g0PBZTSHtfGnIX7LA4/EhOzUC/5gD36Nw4tNOVWqv0EWq8ipSaNMzhfOdkMyy9GWjt9pIhDKz7dDaRjEa960ZeJHeNcYihz3tp8uZiDSsobWqwmT366Zsif5nPBQrZlyUbI7L/a+QbjbZjHbzISIDqKSNLb+bcx+8nosY+9FUBQNBSthxugulkKppvOW9wTOAfoPJo90bu6sia8uZkihb/s3k+9S+lnZsyk/XmZQWpDh+PgBLDBPytbac+4eIZRZn5oa0zwC3L6yJdECfMQgrxp1MFuyL3nb/ZpupWKMnCJpgQhRZpJcQbbBGxmrJtgO/AXSPFvGGtdCzm6AIJaAjNRzcqjVKUsEe8bheHPWGk Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Baoquan He Every swap device already has a lazily allocated per-cluster backend table, so record zswap entries there instead of in a per-type xarray: O(1) lookup by cluster, no radix tree, and no per-type tree to allocate at swapon or free at swapoff. The swap table is untouched, so the count and fault paths are unchanged. xswap shares the table: an untagged word is its physical backend. A tagged zswap handle replaced by a physical backend is left for the writeback path that is freeing it, and released after the data has been decompressed. Signed-off-by: Baoquan He --- include/linux/zswap.h | 7 -- mm/swapfile.c | 21 +++--- mm/zswap.c | 156 ++++++++++++++---------------------------- 3 files changed, 59 insertions(+), 125 deletions(-) diff --git a/include/linux/zswap.h b/include/linux/zswap.h index 6d6c791b1167..c7faad1d1b42 100644 --- a/include/linux/zswap.h +++ b/include/linux/zswap.h @@ -28,8 +28,6 @@ unsigned long zswap_total_pages(void); bool zswap_store(struct folio *folio, bool may_enter_fs); int zswap_load(struct folio *folio); void zswap_invalidate(int type, pgoff_t offset, unsigned long nr_entries); -int zswap_swapon(int type, unsigned long nr_pages); -void zswap_swapoff(int type); void zswap_memcg_offline_cleanup(struct mem_cgroup *memcg); void zswap_lruvec_state_init(struct lruvec *lruvec); void zswap_folio_swapin(struct folio *folio); @@ -55,11 +53,6 @@ static inline void zswap_invalidate(int type, pgoff_t offset, { } -static inline int zswap_swapon(int type, unsigned long nr_pages) -{ - return 0; -} -static inline void zswap_swapoff(int type) {} static inline void zswap_memcg_offline_cleanup(struct mem_cgroup *memcg) {} static inline void zswap_lruvec_state_init(struct lruvec *lruvec) {} static inline void zswap_folio_swapin(struct folio *folio) {} diff --git a/mm/swapfile.c b/mm/swapfile.c index 1862f0b93c92..66a7682e29f0 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -4376,7 +4376,6 @@ static int __swapoff(struct swap_info_struct *p) spin_unlock(&p->lock); spin_unlock(&swap_lock); arch_swap_invalidate_area(p->type); - zswap_swapoff(p->type); mutex_unlock(&swapon_mutex); kfree(p->global_cluster); p->global_cluster = NULL; @@ -5141,6 +5140,14 @@ void xswap_backend_drop(swp_entry_t entry, unsigned int order) ci = swap_cluster_lock(si, off + i); if (!ci) continue; + /* + * A fresh cluster has no table yet, and therefore no old slot range + * to drop. + */ + if (!ci->backend_table) { + swap_cluster_unlock(ci); + continue; + } old = xswap_slot_backend(ci, (off + i) % SWAPFILE_CLUSTER); swap_cluster_unlock(ci); if (old.val) @@ -5678,10 +5685,6 @@ static int xswap_create(int prio) if (error) goto bad_swap; - error = zswap_swapon(si->type, si->max); - if (error) - goto bad_swap; - mutex_lock(&swapon_mutex); xswap_debugfs_add(si); si->prio = prio; @@ -5952,10 +5955,6 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) } } - error = zswap_swapon(si->type, maxpages); - if (error) - goto bad_swap_unlock_inode; - /* * Flush any pending IO and dirty mappings before we start using this * swap device. @@ -5964,7 +5963,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) error = inode_drain_writes(inode); if (error) { inode->i_flags &= ~S_SWAPFILE; - goto free_swap_zswap; + goto bad_swap_unlock_inode; } mutex_lock(&swapon_mutex); @@ -5998,8 +5997,6 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) error = 0; goto out; -free_swap_zswap: - zswap_swapoff(si->type); bad_swap_unlock_inode: inode_unlock(inode); bad_swap: diff --git a/mm/zswap.c b/mm/zswap.c index dfb7ea058d66..1903367a9576 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -158,10 +158,10 @@ struct crypto_acomp_ctx { }; /* - * The lock ordering is zswap_tree.lock -> zswap_pool.lru_lock. - * The only case where lru_lock is not acquired while holding tree.lock is - * when a zswap_entry is taken off the lru for writeback, in that case it - * needs to be verified that it's still valid in the tree. + * The lock ordering is swap cluster lock -> zswap_pool.lru_lock. + * The only case where lru_lock is not acquired while holding the cluster + * lock is when a zswap_entry is taken off the lru for writeback, in that + * case it needs to be verified that it is still recorded in the slot. */ struct zswap_pool { struct zs_pool *zs_pool; @@ -199,7 +199,7 @@ static struct shrinker *zswap_shrinker; * This structure contains the metadata for tracking a single compressed * page within zswap. * - * swpentry - associated swap entry, the offset indexes into the xarray + * swpentry - associated swap entry, the slot's backend record points here * length - the length in bytes of the compressed page data. Needed during * decompression. * referenced - true if the entry recently entered the zswap pool. Unset by the @@ -231,9 +231,6 @@ static struct zswap_pool *zswap_entry_pool(struct zswap_entry *entry) return xa_load(&zswap_pools, entry->pool_idx); } -static struct xarray *zswap_trees[MAX_SWAPFILES]; -static unsigned int nr_zswap_trees[MAX_SWAPFILES]; - /* pool counter to provide unique names to zsmalloc */ static atomic_t zswap_pools_count = ATOMIC_INIT(0); @@ -255,20 +252,6 @@ static bool zswap_has_pool; * helpers and fwd declarations **********************************/ -/* One swap address space for each 64M swap space */ -#define ZSWAP_ADDRESS_SPACE_SHIFT 14 -#define ZSWAP_ADDRESS_SPACE_PAGES (1 << ZSWAP_ADDRESS_SPACE_SHIFT) - -static inline struct xarray *zswap_tree(int type, pgoff_t offset) -{ - return &zswap_trees[type][offset >> ZSWAP_ADDRESS_SPACE_SHIFT]; -} - -static inline struct xarray *swap_zswap_tree(swp_entry_t swp) -{ - return zswap_tree(swp_type(swp), swp_offset(swp)); -} - #define zswap_pool_debug(msg, p) \ pr_debug("%s pool %s\n", msg, (p)->tfm_name) @@ -1089,8 +1072,6 @@ static int zswap_writeback_entry(struct swap_io_ctx *ctx, struct zswap_entry *entry, swp_entry_t swpentry, bool may_enter_fs) { - struct xarray *tree; - pgoff_t offset = swp_offset(swpentry); struct folio *folio; struct mempolicy *mpol; struct swap_info_struct *si; @@ -1147,14 +1128,13 @@ static int zswap_writeback_entry(struct swap_io_ctx *ctx, /* * folio is locked, and the swapcache is now secured against * concurrent swapping to and from the slot, and concurrent - * swapoff so we can safely dereference the zswap tree here. + * swapoff so we can safely dereference the backend table here. * Verify that the swap entry hasn't been invalidated and recycled * behind our backs, to avoid overwriting a new swap folio with * old compressed data. Only when this is successful can the entry * be dereferenced. */ - tree = swap_zswap_tree(swpentry); - if (entry != xa_load(tree, offset)) { + if (entry != swap_backend_get(swpentry)) { ret = -ENOMEM; goto err; } @@ -1173,7 +1153,11 @@ static int zswap_writeback_entry(struct swap_io_ctx *ctx, goto err; } - xa_erase(tree, offset); + /* + * On an xswap device the physical slot was recorded first, so the + * entry this clears was already replaced and nothing is returned. + */ + swap_backend_erase(swpentry); count_vm_event(ZSWPWB); if (entry->objcg) @@ -1205,8 +1189,21 @@ static int zswap_writeback_entry(struct swap_io_ctx *ctx, return 0; err: - if (is_xswap && phys.val) + if (is_xswap && phys.val) { + void *old; + xswap_backend_free(swpentry, phys, 0); + /* + * Reserving the destination displaced the entry from the + * backend table, and it is still in zswap: put it back. + * The table exists by now, so this cannot fail. A handle + * that was already there is stale; do not leak it. + */ + old = swap_backend_set(swpentry, entry); + WARN_ON_ONCE(IS_ERR(old)); + if (!IS_ERR_OR_NULL(old) && old != entry) + zswap_entry_free(old); + } swap_cache_del_folio(folio); folio_unlock(folio); folio_put(folio); @@ -1290,7 +1287,7 @@ static enum lru_status shrink_memcg_cb(struct list_head *item, struct list_lru_o /* * Once the lru lock is dropped, the entry might get freed. The * swpentry is copied to the stack, and entry isn't deref'd again - * until the entry is verified to still be alive in the tree. + * until the entry is verified to still be in the backend table. */ swpentry = entry->swpentry; @@ -1623,19 +1620,17 @@ static bool zswap_store_page(struct folio *folio, long index, goto compress_failed; /* - * Set pool_idx before the xa_store() below publishes the entry, or a - * concurrent reader could resolve a stale pool_idx left by slab reuse - * to an unrelated live pool. + * Set pool_idx before swap_backend_set() below publishes the entry, + * or a concurrent reader could resolve a stale pool_idx left by slab + * reuse to an unrelated live pool. */ entry->pool_idx = pool->idx; - old = xa_store(swap_zswap_tree(page_swpentry), - swp_offset(page_swpentry), - entry, GFP_KERNEL); - if (xa_is_err(old)) { - int err = xa_err(old); + old = swap_backend_set(page_swpentry, entry); + if (IS_ERR(old)) { + int err = PTR_ERR(old); - WARN_ONCE(err != -ENOMEM, "unexpected xarray error: %d\n", err); + WARN_ONCE(err != -ENOMEM, "unexpected backend index error: %d\n", err); zswap_reject_alloc_fail++; goto store_failed; } @@ -1649,11 +1644,8 @@ static bool zswap_store_page(struct folio *folio, long index, zswap_entry_free(old); /* - * The entry is successfully compressed and stored in the tree, there is - * no further possibility of failure. Grab refs to the pool and objcg, - * charge zswap memory, and increment zswap_stored_pages. - * The opposite actions will be performed by zswap_entry_free() - * when the entry is removed from the tree. + * The entry is stored and cannot fail now. Take the pool and objcg + * refs and charge zswap memory; zswap_entry_free() undoes them. */ zswap_pool_get(pool); if (objcg) { @@ -1665,8 +1657,8 @@ static bool zswap_store_page(struct folio *folio, long index, atomic_long_inc(&zswap_stored_incompressible_pages); /* - * We finish initializing the entry while it's already in xarray. - * This is safe because: + * We finish initializing the entry while it's already in the backend + * table. This is safe because: * * 1. Concurrent stores and invalidations are excluded by folio lock. * @@ -1773,22 +1765,13 @@ bool zswap_store(struct folio *folio, bool may_enter_fs) */ bool zswap_is_present(swp_entry_t entry, unsigned int nr) { - pgoff_t offset = swp_offset(entry); - struct xarray *tree = swap_zswap_tree(entry); - unsigned long index = offset; - - if (zswap_never_enabled() || xa_empty(tree)) - return false; - /* * A pinned range is at most SWAPFILE_CLUSTER slots and is aligned to - * its own size, so one tree covers all of it and a single lookup is - * enough. Scanning only part of the range would report a false + * its own size, so the whole range sits in one cluster and one + * table. Scanning only part of the range would report a false * "absent" and let the caller read a stale copy from the device. */ - BUILD_BUG_ON(SWAPFILE_CLUSTER > ZSWAP_ADDRESS_SPACE_PAGES); - - return xa_find(tree, &index, offset + nr - 1, XA_PRESENT); + return swap_backend_present(entry, nr); } /** @@ -1811,8 +1794,6 @@ bool zswap_is_present(swp_entry_t entry, unsigned int nr) int zswap_load(struct folio *folio) { swp_entry_t swp = folio->swap; - pgoff_t offset = swp_offset(swp); - struct xarray *tree = swap_zswap_tree(swp); struct zswap_entry *entry; VM_WARN_ON_ONCE(!folio_test_locked(folio)); @@ -1836,7 +1817,7 @@ int zswap_load(struct folio *folio) return -ENOENT; } - entry = xa_load(tree, offset); + entry = swap_backend_get(swp); if (!entry) return -ENOENT; @@ -1859,7 +1840,7 @@ int zswap_load(struct folio *folio) * compression work. */ folio_mark_dirty(folio); - xa_erase(tree, offset); + swap_backend_erase(swp); zswap_entry_free(entry); folio_unlock(folio); @@ -1868,62 +1849,25 @@ int zswap_load(struct folio *folio) void zswap_invalidate(int type, pgoff_t offset, unsigned long nr_entries) { - struct zswap_entry *entry; - struct xarray *tree; unsigned long i; if (zswap_never_enabled()) return; + /* + * The slot free path runs under the cluster lock once the slots are + * no longer allocatable, and the store rollback holds the folio + * lock, so only one caller can see a tagged handle. + */ for (i = 0; i < nr_entries; i++) { - tree = zswap_tree(type, offset + i); - - if (xa_empty(tree)) - continue; + struct zswap_entry *entry; - entry = xa_erase(tree, offset + i); + entry = swap_backend_erase(swp_entry(type, offset + i)); if (entry) zswap_entry_free(entry); } } -int zswap_swapon(int type, unsigned long nr_pages) -{ - struct xarray *trees, *tree; - unsigned int nr, i; - - nr = DIV_ROUND_UP(nr_pages, ZSWAP_ADDRESS_SPACE_PAGES); - trees = kvzalloc_objs(*tree, nr); - if (!trees) { - pr_err("alloc failed, zswap disabled for swap type %d\n", type); - return -ENOMEM; - } - - for (i = 0; i < nr; i++) - xa_init(trees + i); - - nr_zswap_trees[type] = nr; - zswap_trees[type] = trees; - return 0; -} - -void zswap_swapoff(int type) -{ - struct xarray *trees = zswap_trees[type]; - unsigned int i; - - if (!trees) - return; - - /* try_to_unuse() invalidated all the entries already */ - for (i = 0; i < nr_zswap_trees[type]; i++) - WARN_ON_ONCE(!xa_empty(trees + i)); - - kvfree(trees); - nr_zswap_trees[type] = 0; - zswap_trees[type] = NULL; -} - /********************************* * debugfs functions **********************************/ -- 2.54.0