diff options
author | Stefan Behrens <sbehrens@giantdisaster.de> | 2013-08-09 19:08:40 +0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 16:16:28 +0400 |
commit | 9d565ba4330db102127f19d159609df5c3a375d8 (patch) | |
tree | 996d62436e50a6442b4da37cbc8ff0db460fe3d6 /fs/btrfs | |
parent | b9e9a6cbc6d25b89d8007e5a680319e07921ead8 (diff) | |
download | linux-9d565ba4330db102127f19d159609df5c3a375d8.tar.xz |
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: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/disk-io.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 6d642e487229..0f75a01f69e2 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -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; |