Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: fdmanana@kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: zstd: remove unnecessary early return in reclaim function
Date: Wed, 11 Nov 2026 09:23:00 +1030	[thread overview]
Message-ID: <966abdeb-2cf5-47e3-b4a7-c32002f3b665@suse.com> (raw)
In-Reply-To: <13284885928812954a694ac399f3186b76806fbe.1794351010.git.fdmanana@suse.com>



在 2026/11/11 09:20, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
> 
> There's no point in having an early empty list check to return immediately
> since all the code that follows can deal with an empty list and does not
> have any overhead. So remove that check.
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

> ---
>   fs/btrfs/zstd.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/fs/btrfs/zstd.c b/fs/btrfs/zstd.c
> index 8756b19f37b6..e4937f6fde29 100644
> --- a/fs/btrfs/zstd.c
> +++ b/fs/btrfs/zstd.c
> @@ -116,11 +116,6 @@ static void zstd_reclaim_timer_fn(struct timer_list *timer)
>   
>   	spin_lock(&zwsm->lock);
>   
> -	if (list_empty(&zwsm->lru_list)) {
> -		spin_unlock(&zwsm->lock);
> -		return;
> -	}
> -
>   	list_for_each_prev_safe(pos, next, &zwsm->lru_list) {
>   		struct workspace *victim = container_of(pos, struct workspace,
>   							lru_list);


      reply	other threads:[~2026-11-10 22:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 22:50 [PATCH] btrfs: zstd: remove unnecessary early return in reclaim function fdmanana
2026-11-10 22:53 ` Qu Wenruo [this message]

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=966abdeb-2cf5-47e3-b4a7-c32002f3b665@suse.com \
    --to=wqu@suse.com \
    --cc=fdmanana@kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /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