aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 57746c11eae3..1cb084efd6ed 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -56,7 +56,6 @@ static noinline int join_transaction(struct btrfs_root *root)
56 total_trans++; 56 total_trans++;
57 BUG_ON(!cur_trans); 57 BUG_ON(!cur_trans);
58 root->fs_info->generation++; 58 root->fs_info->generation++;
59 root->fs_info->running_transaction = cur_trans;
60 root->fs_info->last_alloc = 0; 59 root->fs_info->last_alloc = 0;
61 root->fs_info->last_data_alloc = 0; 60 root->fs_info->last_data_alloc = 0;
62 cur_trans->num_writers = 1; 61 cur_trans->num_writers = 1;
@@ -74,6 +73,9 @@ static noinline int join_transaction(struct btrfs_root *root)
74 extent_io_tree_init(&cur_trans->dirty_pages, 73 extent_io_tree_init(&cur_trans->dirty_pages,
75 root->fs_info->btree_inode->i_mapping, 74 root->fs_info->btree_inode->i_mapping,
76 GFP_NOFS); 75 GFP_NOFS);
76 spin_lock(&root->fs_info->new_trans_lock);
77 root->fs_info->running_transaction = cur_trans;
78 spin_unlock(&root->fs_info->new_trans_lock);
77 } else { 79 } else {
78 cur_trans->num_writers++; 80 cur_trans->num_writers++;
79 cur_trans->num_joined++; 81 cur_trans->num_joined++;