Commit 9d565ba4 authored by Stefan Behrens's avatar Stefan Behrens Committed by Chris Mason

Btrfs: get rid of one BUG() in write_all_supers()

The second round uses btrfs_error() and return -EIO, the first round
can handle write errors the same way.
Signed-off-by: default avatarStefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent b9e9a6cb
......@@ -3416,8 +3416,10 @@ static int write_all_supers(struct btrfs_root *root, int max_mirrors)
printk(KERN_ERR "btrfs: %d errors while writing supers\n",
total_errors);
/* This shouldn't happen. FUA is masked off if unsupported */
BUG();
/* FUA is masked off if unsupported and can't be the reason */
btrfs_error(root->fs_info, -EIO,
"%d errors while writing supers", total_errors);
return -EIO;
}
total_errors = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment