On 27.02.2017 13:28, Kevin Wolf wrote: > Am 22.02.2017 um 15:04 hat Max Reitz geschrieben: >>> @@ -1390,6 +1565,7 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState >>> *child_bs, >>> >>> ret = bdrv_check_update_perm(child_bs, perm, shared_perm, NULL, errp); >>> if (ret < 0) { >>> + bdrv_abort_perm_update(child_bs); >>> return NULL; >>> } >>> >> >> This function doesn't call bdrv_set_perm(). Intentional? > > Yes, intentional. It calls it indirectly via bdrv_replace_child(). I'll > add a comment.
Right, bdrv_replace_child() invokes bdrv_update_perm() which invokes bdrv_set_perm(). However, that means that there shouldn't be any caller of bdrv_replace_child() which doesn't call bdrv_check_perm() before; some don't do that, though, e.g. change_parent_backing_link(). Max
signature.asc
Description: OpenPGP digital signature