diff options
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 11b77a59db62..36422254ef67 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -73,8 +73,10 @@ loop: | |||
73 | 73 | ||
74 | cur_trans = root->fs_info->running_transaction; | 74 | cur_trans = root->fs_info->running_transaction; |
75 | if (cur_trans) { | 75 | if (cur_trans) { |
76 | if (cur_trans->aborted) | 76 | if (cur_trans->aborted) { |
77 | spin_unlock(&root->fs_info->trans_lock); | ||
77 | return cur_trans->aborted; | 78 | return cur_trans->aborted; |
79 | } | ||
78 | atomic_inc(&cur_trans->use_count); | 80 | atomic_inc(&cur_trans->use_count); |
79 | atomic_inc(&cur_trans->num_writers); | 81 | atomic_inc(&cur_trans->num_writers); |
80 | cur_trans->num_joined++; | 82 | cur_trans->num_joined++; |
@@ -1400,6 +1402,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
1400 | ret = commit_fs_roots(trans, root); | 1402 | ret = commit_fs_roots(trans, root); |
1401 | if (ret) { | 1403 | if (ret) { |
1402 | mutex_unlock(&root->fs_info->tree_log_mutex); | 1404 | mutex_unlock(&root->fs_info->tree_log_mutex); |
1405 | mutex_unlock(&root->fs_info->reloc_mutex); | ||
1403 | goto cleanup_transaction; | 1406 | goto cleanup_transaction; |
1404 | } | 1407 | } |
1405 | 1408 | ||
@@ -1411,6 +1414,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
1411 | ret = commit_cowonly_roots(trans, root); | 1414 | ret = commit_cowonly_roots(trans, root); |
1412 | if (ret) { | 1415 | if (ret) { |
1413 | mutex_unlock(&root->fs_info->tree_log_mutex); | 1416 | mutex_unlock(&root->fs_info->tree_log_mutex); |
1417 | mutex_unlock(&root->fs_info->reloc_mutex); | ||
1414 | goto cleanup_transaction; | 1418 | goto cleanup_transaction; |
1415 | } | 1419 | } |
1416 | 1420 | ||