提交 af4b0ed0 编写于 作者: K Konstantin Neumoin 提交者: Michal Privoznik

vz: fix raise in vzDomainBlock

Put domain access after acquiring job condition, otherwise
another job can change it meanwhile.
Signed-off-by: NKonstantin Neumoin <kneumoin@virtuozzo.com>
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 0c5d5cb9
......@@ -3977,12 +3977,6 @@ vzDomainBlockResize(virDomainPtr domain,
size /= 1024;
size /= 1024;
if (!(disk = virDomainDiskByName(dom->def, path, false))) {
virReportError(VIR_ERR_INVALID_ARG,
_("invalid path: %s"), path);
goto cleanup;
}
if (vzDomainObjBeginJob(dom) < 0)
goto cleanup;
job = true;
......@@ -3996,6 +3990,12 @@ vzDomainBlockResize(virDomainPtr domain,
goto cleanup;
}
if (!(disk = virDomainDiskByName(dom->def, path, false))) {
virReportError(VIR_ERR_INVALID_ARG,
_("invalid path: %s"), path);
goto cleanup;
}
ret = prlsdkResizeImage(dom, disk, size);
cleanup:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册