diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/transaction.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 32454d1c566f..e51d2bc532f8 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -942,9 +942,11 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
942 | 942 | ||
943 | mutex_unlock(&root->fs_info->trans_mutex); | 943 | mutex_unlock(&root->fs_info->trans_mutex); |
944 | 944 | ||
945 | if (flush_on_commit || snap_pending) { | 945 | if (flush_on_commit) { |
946 | if (flush_on_commit) | 946 | btrfs_start_delalloc_inodes(root); |
947 | btrfs_start_delalloc_inodes(root); | 947 | ret = btrfs_wait_ordered_extents(root, 0); |
948 | BUG_ON(ret); | ||
949 | } else if (snap_pending) { | ||
948 | ret = btrfs_wait_ordered_extents(root, 1); | 950 | ret = btrfs_wait_ordered_extents(root, 1); |
949 | BUG_ON(ret); | 951 | BUG_ON(ret); |
950 | } | 952 | } |