From: David Sterba Date: Wed, 9 Oct 2024 14:30:50 +0000 (+0200) Subject: btrfs: zstd: assert the timer pointer in callback X-Git-Tag: v6.13-rc1~213^2~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2fac7e163d24f77476399c5e646edcf86db57d0c;p=thirdparty%2Flinux.git 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 Signed-off-by: David Sterba --- diff --git a/fs/btrfs/zstd.c b/fs/btrfs/zstd.c index 15f8a83165a38..5232b56d58925 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)) {