diff options
author | David Sterba <dsterba@suse.com> | 2024-10-09 16:30:50 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-11-11 14:34:15 +0100 |
commit | 2fac7e163d24f77476399c5e646edcf86db57d0c (patch) | |
tree | bca3d594852a3cda37f3464748d6d19fb63b1ec7 /fs/btrfs | |
parent | 0fcaf926ad7650f3f4badaca355e59ebc2773045 (diff) |
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/zstd.c | 2 |
1 files changed, 2 insertions, 0 deletions
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)) { |