mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
LXC: remove duplicate controller check code
We invoked virCgroupHasController twice for checking VIR_CGROUP_CONTROLLER_DEVICES in lxcDomainAttachDeviceDiskLive. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
parent
f1e192e92e
commit
3d41eb310e
@ -4052,12 +4052,6 @@ lxcDomainAttachDeviceDiskLive(virLXCDriverPtr driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_DEVICES)) {
|
|
||||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
|
||||||
_("devices cgroup isn't mounted"));
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
perms = (def->readonly ?
|
perms = (def->readonly ?
|
||||||
VIR_CGROUP_DEVICE_READ :
|
VIR_CGROUP_DEVICE_READ :
|
||||||
VIR_CGROUP_DEVICE_RW) |
|
VIR_CGROUP_DEVICE_RW) |
|
||||||
|
Loading…
Reference in New Issue
Block a user