Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
Btrfs: remove root_log_ctx from ctx list before btrfs_sync_log returns
Browse files Browse the repository at this point in the history
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 <clm@fb.com>
Fixes: d1433de
cc: stable@vger.kernel.org # 3.15+
  • Loading branch information
masoncl committed Sep 6, 2016
1 parent cb88708 commit cbd60aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/tree-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
blk_finish_plug(&plug);
list_del_init(&root_log_ctx.list);
mutex_unlock(&log_root_tree->log_mutex);
ret = root_log_ctx.log_ret;
goto out;
Expand Down

0 comments on commit cbd60aa

Please sign in to comment.