Btrfs: remove all BUG_ON()'s from commit_cowonly_roots
authorJosef Bacik <jbacik@fusionio.com>
Fri, 27 Sep 2013 20:38:20 +0000 (16:38 -0400)
committerChris Mason <chris.mason@fusionio.com>
Tue, 12 Nov 2013 02:53:57 +0000 (21:53 -0500)
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>
fs/btrfs/transaction.c

index a1343e81c59df95656da812dabf4a228f696b6c8..f08e22885c21aab0e9a0e40fc65188f9e911f563 100644 (file)
@@ -950,16 +950,19 @@ static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans,
                return ret;
 
        ret = btrfs_run_dev_stats(trans, root->fs_info);
-       WARN_ON(ret);
+       if (ret)
+               return ret;
        ret = btrfs_run_dev_replace(trans, root->fs_info);
-       WARN_ON(ret);
-
+       if (ret)
+               return ret;
        ret = btrfs_run_qgroups(trans, root->fs_info);
-       BUG_ON(ret);
+       if (ret)
+               return ret;
 
        /* run_qgroups might have added some more refs */
        ret = btrfs_run_delayed_refs(trans, root, (unsigned long)-1);
-       BUG_ON(ret);
+       if (ret)
+               return ret;
 
        while (!list_empty(&fs_info->dirty_cowonly_roots)) {
                next = fs_info->dirty_cowonly_roots.next;
This page took 0.029483 seconds and 5 git commands to generate.