btrfs: zstd: assert the timer pointer in callback

Make sure we got the right timer struct for the zstd workspace reclaim
work.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2024-10-09 16:30:50 +02:00
parent 0fcaf926ad
commit 2fac7e163d

View File

@ -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)) {