diff mbox series

[01/25] btrfs: zstd: assert the timer pointer in callback

Message ID c7ced95da874e59e8d95de5fe23371737adaa235.1728484021.git.dsterba@suse.com (mailing list archive)
State New, archived
Headers show
Series Unused parameter cleanups | expand

Commit Message

David Sterba Oct. 9, 2024, 2:30 p.m. UTC
Make sure we got the right timer struct for the zstd workspace reclaim
work.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/zstd.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/fs/btrfs/zstd.c b/fs/btrfs/zstd.c
index 15f8a83165a3..5232b56d5892 100644
--- a/fs/btrfs/zstd.c
+++ b/fs/btrfs/zstd.c
@@ -111,6 +111,8 @@  static void zstd_reclaim_timer_fn(struct timer_list *timer)
 	unsigned long reclaim_threshold = jiffies - ZSTD_BTRFS_RECLAIM_JIFFIES;
 	struct list_head *pos, *next;
 
+	ASSERT(timer == &wsm.timer);
+
 	spin_lock(&wsm.lock);
 
 	if (list_empty(&wsm.lru_list)) {