Commit ac08aedf authored by Chris Mason's avatar Chris Mason

Btrfs: check the return value from set_anon_super

Al Viro noticed we weren't checking for set_anon_super failures.  This
adds the required checks.
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 30b4caf5
...@@ -1312,7 +1312,9 @@ struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, ...@@ -1312,7 +1312,9 @@ struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info,
spin_lock_init(&root->cache_lock); spin_lock_init(&root->cache_lock);
init_waitqueue_head(&root->cache_wait); init_waitqueue_head(&root->cache_wait);
set_anon_super(&root->anon_super, NULL); ret = set_anon_super(&root->anon_super, NULL);
if (ret)
goto fail;
if (btrfs_root_refs(&root->root_item) == 0) { if (btrfs_root_refs(&root->root_item) == 0) {
ret = -ENOENT; ret = -ENOENT;
......
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