From: Chen Hanxiao Date: Mon, 7 Jul 2014 06:26:57 +0000 (+0800) Subject: LXC: remove duplicate controller check code X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3d41eb310ed7dacd73113008975a2166230c4eae;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git LXC: remove duplicate controller check code We invoked virCgroupHasController twice for checking VIR_CGROUP_CONTROLLER_DEVICES in lxcDomainAttachDeviceDiskLive. Signed-off-by: Chen Hanxiao --- diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index fce16f2d0..9c006e9c2 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -4052,12 +4052,6 @@ lxcDomainAttachDeviceDiskLive(virLXCDriverPtr driver, 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 ? VIR_CGROUP_DEVICE_READ : VIR_CGROUP_DEVICE_RW) |