Commit 50bfbe93 authored by Fam Zheng's avatar Fam Zheng Committed by Kevin Wolf
Browse files

block: Don't use error_abort in blk_new_open



We have an errp and bdrv_root_attach_child can fail permission check,
error_abort is not the best choice here.

Signed-off-by: default avatarFam Zheng <famz@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent d282f34e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -213,7 +213,12 @@ BlockBackend *blk_new_open(const char *filename, const char *reference,
    }

    blk->root = bdrv_root_attach_child(bs, "root", &child_root,
                                       perm, BLK_PERM_ALL, blk, &error_abort);
                                       perm, BLK_PERM_ALL, blk, errp);
    if (!blk->root) {
        bdrv_unref(bs);
        blk_unref(blk);
        return NULL;
    }

    return blk;
}