diff options
Diffstat (limited to 'fs/btrfs/transaction.c')
| -rw-r--r-- | fs/btrfs/transaction.c | 7 | 
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index b2acc79f1b34..2d654c1c794d 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c  | |||
| @@ -69,7 +69,7 @@ static noinline int join_transaction(struct btrfs_root *root) | |||
| 69 | cur_trans->commit_done = 0; | 69 | cur_trans->commit_done = 0; | 
| 70 | cur_trans->start_time = get_seconds(); | 70 | cur_trans->start_time = get_seconds(); | 
| 71 | 71 | ||
| 72 | cur_trans->delayed_refs.root.rb_node = NULL; | 72 | cur_trans->delayed_refs.root = RB_ROOT; | 
| 73 | cur_trans->delayed_refs.num_entries = 0; | 73 | cur_trans->delayed_refs.num_entries = 0; | 
| 74 | cur_trans->delayed_refs.num_heads_ready = 0; | 74 | cur_trans->delayed_refs.num_heads_ready = 0; | 
| 75 | cur_trans->delayed_refs.num_heads = 0; | 75 | cur_trans->delayed_refs.num_heads = 0; | 
| @@ -997,13 +997,10 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
| 997 | 997 | ||
| 998 | mutex_unlock(&root->fs_info->trans_mutex); | 998 | mutex_unlock(&root->fs_info->trans_mutex); | 
| 999 | 999 | ||
| 1000 | if (flush_on_commit) { | 1000 | if (flush_on_commit || snap_pending) { | 
| 1001 | btrfs_start_delalloc_inodes(root, 1); | 1001 | btrfs_start_delalloc_inodes(root, 1); | 
| 1002 | ret = btrfs_wait_ordered_extents(root, 0, 1); | 1002 | ret = btrfs_wait_ordered_extents(root, 0, 1); | 
| 1003 | BUG_ON(ret); | 1003 | BUG_ON(ret); | 
| 1004 | } else if (snap_pending) { | ||
| 1005 | ret = btrfs_wait_ordered_extents(root, 0, 1); | ||
| 1006 | BUG_ON(ret); | ||
| 1007 | } | 1004 | } | 
| 1008 | 1005 | ||
| 1009 | /* | 1006 | /* | 
