* [merged mm-stable] mm-zswap-simplify-zswap_invalidate.patch removed from -mm tree
@ 2024-02-22 0:01 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-02-22 0:01 UTC (permalink / raw)
To: mm-commits, zhouchengming, yosryahmed, nphamcs, hannes, akpm
The quilt patch titled
Subject: mm: zswap: simplify zswap_invalidate()
has been removed from the -mm tree. Its filename was
mm-zswap-simplify-zswap_invalidate.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: Johannes Weiner <hannes@cmpxchg.org>
Subject: mm: zswap: simplify zswap_invalidate()
Date: Mon, 29 Jan 2024 20:36:45 -0500
The branching is awkward and duplicates code. The comment about
writeback is also misleading: yes, the entry might have been written
back. Or it might have never been stored in zswap to begin with due to
a rejection - zswap_invalidate() is called on all exiting swap entries.
Link: https://lkml.kernel.org/r/20240130014208.565554-10-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Acked-by: Yosry Ahmed <yosryahmed@google.com>
Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/zswap.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
--- a/mm/zswap.c~mm-zswap-simplify-zswap_invalidate
+++ a/mm/zswap.c
@@ -1739,15 +1739,10 @@ void zswap_invalidate(int type, pgoff_t
struct zswap_tree *tree = swap_zswap_tree(swp_entry(type, offset));
struct zswap_entry *entry;
- /* find */
spin_lock(&tree->lock);
entry = zswap_rb_search(&tree->rbroot, offset);
- if (!entry) {
- /* entry was written back */
- spin_unlock(&tree->lock);
- return;
- }
- zswap_invalidate_entry(tree, entry);
+ if (entry)
+ zswap_invalidate_entry(tree, entry);
spin_unlock(&tree->lock);
}
_
Patches currently in -mm which might be from hannes@cmpxchg.org are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-22 0:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-22 0:01 [merged mm-stable] mm-zswap-simplify-zswap_invalidate.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.