All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-zswap-remove-unnecessary-check-in-zswap_find_zpool.patch removed from -mm tree
@ 2024-04-26  3:57 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-04-26  3:57 UTC (permalink / raw)
  To: mm-commits, nphamcs, hannes, chengming.zhou, yosryahmed, akpm


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 <yosryahmed@google.com>
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.

Link: https://lkml.kernel.org/r/20240311235210.2937484-1-yosryahmed@google.com
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Reviewed-by: Chengming Zhou <chengming.zhou@linux.dev>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/zswap.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

--- a/mm/zswap.c~mm-zswap-remove-unnecessary-check-in-zswap_find_zpool
+++ a/mm/zswap.c
@@ -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 yosryahmed@google.com 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-26  3:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-26  3:57 [merged mm-stable] mm-zswap-remove-unnecessary-check-in-zswap_find_zpool.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.