diff options
-rw-r--r-- | fs/btrfs/transaction.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index d8fce6fe9cf8..fedede1fe178 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -1457,6 +1457,13 @@ static void cleanup_transaction(struct btrfs_trans_handle *trans, | |||
1457 | btrfs_abort_transaction(trans, root, err); | 1457 | btrfs_abort_transaction(trans, root, err); |
1458 | 1458 | ||
1459 | spin_lock(&root->fs_info->trans_lock); | 1459 | spin_lock(&root->fs_info->trans_lock); |
1460 | |||
1461 | if (list_empty(&cur_trans->list)) { | ||
1462 | spin_unlock(&root->fs_info->trans_lock); | ||
1463 | btrfs_end_transaction(trans, root); | ||
1464 | return; | ||
1465 | } | ||
1466 | |||
1460 | list_del_init(&cur_trans->list); | 1467 | list_del_init(&cur_trans->list); |
1461 | if (cur_trans == root->fs_info->running_transaction) { | 1468 | if (cur_trans == root->fs_info->running_transaction) { |
1462 | root->fs_info->trans_no_join = 1; | 1469 | root->fs_info->trans_no_join = 1; |