mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	Btrfs: remove root_log_ctx from ctx list before btrfs_sync_log returns
We use a btrfs_log_ctx structure to pass information into the tree log commit, and get error values out. It gets added to a per log-transaction list which we walk when things go bad. Commitd1433debeadded an optimization to skip waiting for the log commit, but didn't take root_log_ctx out of the list. This patch makes sure we remove things before exiting. Signed-off-by: Chris Mason <clm@fb.com> Fixes:d1433debe7cc: stable@vger.kernel.org # 3.15+
This commit is contained in:
		
							parent
							
								
									cb887083d0
								
							
						
					
					
						commit
						cbd60aa7cd
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -2867,6 +2867,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (log_root_tree->log_transid_committed >= root_log_ctx.log_transid) {
 | 
						if (log_root_tree->log_transid_committed >= root_log_ctx.log_transid) {
 | 
				
			||||||
		blk_finish_plug(&plug);
 | 
							blk_finish_plug(&plug);
 | 
				
			||||||
 | 
							list_del_init(&root_log_ctx.list);
 | 
				
			||||||
		mutex_unlock(&log_root_tree->log_mutex);
 | 
							mutex_unlock(&log_root_tree->log_mutex);
 | 
				
			||||||
		ret = root_log_ctx.log_ret;
 | 
							ret = root_log_ctx.log_ret;
 | 
				
			||||||
		goto out;
 | 
							goto out;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue