Skip to contentSkip to conversation

mm-zswap-remove-unnecessary-check-in-zswap_find_zpool.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Apr 26, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: zswap: remove unnecessary check in zswap_find_zpool()
has been removed from the -mm tree. Its filename was
mm-zswap-remove-unnecessary-check-in-zswap_find_zpool.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Yosry Ahmed <[email protected]>
Subject: mm: zswap: remove unnecessary check in zswap_find_zpool()
Date: Mon, 11 Mar 2024 23:52:10 +0000

zswap_find_zpool() checks if ZSWAP_NR_ZPOOLS > 1, which is always true. This is a remnant from a patch version that had ZSWAP_NR_ZPOOLS as a config option and never made it upstream. Remove the unnecessary check.

---

 mm/zswap.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
mm/zswap.c renamed from mm/zswap.c~mm-zswap-remove-unnecessary-check-in-zswap_find_zpool +1 -6
@@ -871,12 +871,7 @@ static void zswap_entry_cache_free(struc
 
 static struct zpool *zswap_find_zpool(struct zswap_entry *entry)
 {
-	int i = 0;
-
-	if (ZSWAP_NR_ZPOOLS > 1)
-		i = hash_ptr(entry, ilog2(ZSWAP_NR_ZPOOLS));
-
-	return entry->pool->zpools[i];
+	return entry->pool->zpools[hash_ptr(entry, ilog2(ZSWAP_NR_ZPOOLS))];
 }
 
 /*

_

Patches currently in -mm which might be from [email protected] are

mm-zswap-always-shrink-in-zswap_store-if-zswap_pool_reached_full.patch mm-zswap-refactor-limit-checking-from-zswap_store.patch mm-zswap-move-more-same-filled-pages-checks-outside-of-zswap_store.patch mm-zswap-remove-same_filled-module-params.patch mm-zswap-remove-same_filled-module-params-fix.patch