Message ID | 20120914130933.GJ17430@twin.jikos.cz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 2a36e23..2d654c1 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -997,13 +997,10 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, mutex_unlock(&root->fs_info->trans_mutex); - if (flush_on_commit) { + if (flush_on_commit || snap_pending) { btrfs_start_delalloc_inodes(root, 1); ret = btrfs_wait_ordered_extents(root, 0, 1); BUG_ON(ret); - } else if (snap_pending) { - ret = btrfs_wait_ordered_extents(root, 0, 1); - BUG_ON(ret); } --- the calls to btrfs_wait_ordered_extents were same and thus mergeable.