All of lore.kernel.org
 help / color / mirror / Atom feed
From: Schspa Shi <schspa@gmail.com>
To: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, terrelln@fb.com
Cc: schspa@gmail.com, linux-btrfs@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] btrfs: zstd: use spin_lock in timer function
Date: Sat,  9 Apr 2022 02:15:23 +0800	[thread overview]
Message-ID: <20220408181523.92322-1-schspa@gmail.com> (raw)

timer callback was running on bh, and there is no need to disable bh again.

Signed-off-by: Schspa Shi <schspa@gmail.com>
---
 fs/btrfs/zstd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/zstd.c b/fs/btrfs/zstd.c
index fc42dd0badd7..faa74306f0b7 100644
--- a/fs/btrfs/zstd.c
+++ b/fs/btrfs/zstd.c
@@ -105,10 +105,10 @@ static void zstd_reclaim_timer_fn(struct timer_list *timer)
 	unsigned long reclaim_threshold = jiffies - ZSTD_BTRFS_RECLAIM_JIFFIES;
 	struct list_head *pos, *next;
 
-	spin_lock_bh(&wsm.lock);
+	spin_lock(&wsm.lock);
 
 	if (list_empty(&wsm.lru_list)) {
-		spin_unlock_bh(&wsm.lock);
+		spin_unlock(&wsm.lock);
 		return;
 	}
 
@@ -137,7 +137,7 @@ static void zstd_reclaim_timer_fn(struct timer_list *timer)
 	if (!list_empty(&wsm.lru_list))
 		mod_timer(&wsm.timer, jiffies + ZSTD_BTRFS_RECLAIM_JIFFIES);
 
-	spin_unlock_bh(&wsm.lock);
+	spin_unlock(&wsm.lock);
 }
 
 /*
-- 
2.24.3 (Apple Git-128)


             reply	other threads:[~2022-04-08 18:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08 18:15 Schspa Shi [this message]
2022-04-08 18:44 ` [PATCH] btrfs: zstd: use spin_lock in timer function David Sterba
2022-04-09  7:36   ` Schspa Shi
2022-04-11 13:51     ` David Sterba
2022-04-11 15:55       ` [PATCH v2] btrfs: zstd: use spin_lock in timer callback Schspa Shi
2022-04-13 14:58         ` Nikolay Borisov
2022-04-13 16:00           ` David Sterba
2022-04-13 16:03           ` Schspa Shi
2022-04-13 19:08             ` Nikolay Borisov
2022-04-14 16:39               ` Schspa Shi
2022-04-14 19:26         ` David Sterba

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=20220408181523.92322-1-schspa@gmail.com \
    --to=schspa@gmail.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=terrelln@fb.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 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.