Skip to content

Commit cbd60aa

Browse files
committed
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. Commit d1433de added 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 <[email protected]> Fixes: d1433de cc: [email protected] # 3.15+
1 parent cb88708 commit cbd60aa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/btrfs/tree-log.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2867,6 +2867,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
28672867

28682868
if (log_root_tree->log_transid_committed >= root_log_ctx.log_transid) {
28692869
blk_finish_plug(&plug);
2870+
list_del_init(&root_log_ctx.list);
28702871
mutex_unlock(&log_root_tree->log_mutex);
28712872
ret = root_log_ctx.log_ret;
28722873
goto out;

0 commit comments

Comments
 (0)