aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-09-27 16:38:20 -0400
committerChris Mason <chris.mason@fusionio.com>2013-11-11 21:53:57 -0500
commitc16ce1901431629fbe5b9387cc966d62a089e4df (patch)
tree9c068f5070d487ea1cb04afd0a71f6828e24a794 /fs/btrfs/transaction.c
parent1de2cfde93c20a0357ff1dffed901598470facf3 (diff)
Btrfs: remove all BUG_ON()'s from commit_cowonly_roots
Noticed this when forcing errors to happen during delayed ref running. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index a1343e81c59d..f08e22885c21 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -950,16 +950,19 @@ static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans,
950 return ret; 950 return ret;
951 951
952 ret = btrfs_run_dev_stats(trans, root->fs_info); 952 ret = btrfs_run_dev_stats(trans, root->fs_info);
953 WARN_ON(ret); 953 if (ret)
954 return ret;
954 ret = btrfs_run_dev_replace(trans, root->fs_info); 955 ret = btrfs_run_dev_replace(trans, root->fs_info);
955 WARN_ON(ret); 956 if (ret)
956 957 return ret;
957 ret = btrfs_run_qgroups(trans, root->fs_info); 958 ret = btrfs_run_qgroups(trans, root->fs_info);
958 BUG_ON(ret); 959 if (ret)
960 return ret;
959 961
960 /* run_qgroups might have added some more refs */ 962 /* run_qgroups might have added some more refs */
961 ret = btrfs_run_delayed_refs(trans, root, (unsigned long)-1); 963 ret = btrfs_run_delayed_refs(trans, root, (unsigned long)-1);
962 BUG_ON(ret); 964 if (ret)
965 return ret;
963 966
964 while (!list_empty(&fs_info->dirty_cowonly_roots)) { 967 while (!list_empty(&fs_info->dirty_cowonly_roots)) {
965 next = fs_info->dirty_cowonly_roots.next; 968 next = fs_info->dirty_cowonly_roots.next;