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 a065dec0e330..1e7f176bd211 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -156,6 +156,9 @@ loop: | |||
156 | 156 | ||
157 | spin_lock_init(&cur_trans->commit_lock); | 157 | spin_lock_init(&cur_trans->commit_lock); |
158 | spin_lock_init(&cur_trans->delayed_refs.lock); | 158 | spin_lock_init(&cur_trans->delayed_refs.lock); |
159 | atomic_set(&cur_trans->delayed_refs.procs_running_refs, 0); | ||
160 | atomic_set(&cur_trans->delayed_refs.ref_seq, 0); | ||
161 | init_waitqueue_head(&cur_trans->delayed_refs.wait); | ||
159 | 162 | ||
160 | INIT_LIST_HEAD(&cur_trans->pending_snapshots); | 163 | INIT_LIST_HEAD(&cur_trans->pending_snapshots); |
161 | list_add_tail(&cur_trans->list, &fs_info->trans_list); | 164 | list_add_tail(&cur_trans->list, &fs_info->trans_list); |
@@ -577,7 +580,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, | |||
577 | if (!list_empty(&trans->new_bgs)) | 580 | if (!list_empty(&trans->new_bgs)) |
578 | btrfs_create_pending_block_groups(trans, root); | 581 | btrfs_create_pending_block_groups(trans, root); |
579 | 582 | ||
580 | while (count < 2) { | 583 | while (count < 1) { |
581 | unsigned long cur = trans->delayed_ref_updates; | 584 | unsigned long cur = trans->delayed_ref_updates; |
582 | trans->delayed_ref_updates = 0; | 585 | trans->delayed_ref_updates = 0; |
583 | if (cur && | 586 | if (cur && |
@@ -589,6 +592,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, | |||
589 | } | 592 | } |
590 | count++; | 593 | count++; |
591 | } | 594 | } |
595 | |||
592 | btrfs_trans_release_metadata(trans, root); | 596 | btrfs_trans_release_metadata(trans, root); |
593 | trans->block_rsv = NULL; | 597 | trans->block_rsv = NULL; |
594 | 598 | ||