Skip to content

Commit

Permalink
mm: zswap: remove unused tree argument in zswap_entry_put()
Browse files Browse the repository at this point in the history
Commit 7310895 ("mm: zswap: tighten up entry invalidation") removed
the usage of tree argument, delete it.

Link: https://lkml.kernel.org/r/20240125081423.1200336-1-yosryahmed@google.com
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Yosry Ahmed authored and Andrew Morton committed Feb 22, 2024
1 parent 412c6ef commit db128f5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mm/zswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,7 @@ static void zswap_entry_get(struct zswap_entry *entry)
/* caller must hold the tree lock
* remove from the tree and free it, if nobody reference the entry
*/
static void zswap_entry_put(struct zswap_tree *tree,
struct zswap_entry *entry)
static void zswap_entry_put(struct zswap_entry *entry)
{
int refcount = --entry->refcount;

Expand Down Expand Up @@ -852,7 +851,7 @@ static void zswap_invalidate_entry(struct zswap_tree *tree,
struct zswap_entry *entry)
{
if (zswap_rb_erase(&tree->rbroot, entry))
zswap_entry_put(tree, entry);
zswap_entry_put(entry);
}

static enum lru_status shrink_memcg_cb(struct list_head *item, struct list_lru_one *l,
Expand Down Expand Up @@ -921,7 +920,7 @@ static enum lru_status shrink_memcg_cb(struct list_head *item, struct list_lru_o

put_unlock:
/* Drop local reference */
zswap_entry_put(tree, entry);
zswap_entry_put(entry);
unlock:
spin_unlock(&tree->lock);
spin_lock(lock);
Expand Down Expand Up @@ -1754,7 +1753,7 @@ bool zswap_load(struct folio *folio)
zswap_lru_del(&entry->pool->list_lru, entry);
zswap_lru_add(&entry->pool->list_lru, entry);
}
zswap_entry_put(tree, entry);
zswap_entry_put(entry);
spin_unlock(&tree->lock);

return true;
Expand Down

0 comments on commit db128f5

Please sign in to comment.