mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	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:
		
							parent
							
								
									0fcaf926ad
								
							
						
					
					
						commit
						2fac7e163d
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -111,6 +111,8 @@ static void zstd_reclaim_timer_fn(struct timer_list *timer)
 | 
				
			||||||
	unsigned long reclaim_threshold = jiffies - ZSTD_BTRFS_RECLAIM_JIFFIES;
 | 
						unsigned long reclaim_threshold = jiffies - ZSTD_BTRFS_RECLAIM_JIFFIES;
 | 
				
			||||||
	struct list_head *pos, *next;
 | 
						struct list_head *pos, *next;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ASSERT(timer == &wsm.timer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	spin_lock(&wsm.lock);
 | 
						spin_lock(&wsm.lock);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (list_empty(&wsm.lru_list)) {
 | 
						if (list_empty(&wsm.lru_list)) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue