mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	bcachefs: Fix bch2_fs_check_snapshots()
We were iterating starting at BCACHEFS_ROOT_INO, but snapshots start at POS_MIN - meaning this code was never getting run. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Reported-by: Olexa Bilaniuk <obilaniu@gmail.com>
This commit is contained in:
		
							parent
							
								
									c497df8b85
								
							
						
					
					
						commit
						c59d66b51b
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -278,8 +278,8 @@ int bch2_fs_check_snapshots(struct bch_fs *c)
 | 
			
		|||
 | 
			
		||||
	bch2_trans_init(&trans, c, 0, 0);
 | 
			
		||||
 | 
			
		||||
	ret = for_each_btree_key_commit(&trans, iter, BTREE_ID_snapshots,
 | 
			
		||||
			POS(BCACHEFS_ROOT_INO, 0),
 | 
			
		||||
	ret = for_each_btree_key_commit(&trans, iter,
 | 
			
		||||
			BTREE_ID_snapshots, POS_MIN,
 | 
			
		||||
			BTREE_ITER_PREFETCH, k,
 | 
			
		||||
			NULL, NULL, BTREE_INSERT_LAZY_RW|BTREE_INSERT_NOFAIL,
 | 
			
		||||
		check_snapshot(&trans, &iter, k));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue