linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chengming Zhou <zhouchengming@bytedance.com>
To: Yosry Ahmed <yosryahmed@google.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Nhat Pham <nphamcs@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: zswap: remove unused tree argument in zswap_entry_put()
Date: Thu, 25 Jan 2024 16:17:53 +0800	[thread overview]
Message-ID: <c99a16fc-f459-4283-a65b-2ff84dd0bf15@bytedance.com> (raw)
In-Reply-To: <20240125081423.1200336-1-yosryahmed@google.com>

On 2024/1/25 16:14, Yosry Ahmed wrote:
> Commit 7310895779624 ("mm: zswap: tighten up entry invalidation")
> removed the usage of tree argument, delete it.
> 
> Signed-off-by: Yosry Ahmed <yosryahmed@google.com>

LGTM, thanks!

Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com>

> ---
>  mm/zswap.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/mm/zswap.c b/mm/zswap.c
> index 78df16d307aa8..8f4a7efc2bdae 100644
> --- a/mm/zswap.c
> +++ b/mm/zswap.c
> @@ -569,8 +569,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;
>  
> @@ -853,7 +852,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,
> @@ -924,7 +923,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);
> @@ -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;


  reply	other threads:[~2024-01-25  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25  8:14 Yosry Ahmed
2024-01-25  8:17 ` Chengming Zhou [this message]
2024-01-25 14:45 ` Johannes Weiner
2024-01-25 18:30 ` Nhat Pham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c99a16fc-f459-4283-a65b-2ff84dd0bf15@bytedance.com \
    --to=zhouchengming@bytedance.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=yosryahmed@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox