]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
LXC: remove duplicate controller check code
authorChen Hanxiao <chenhanxiao@cn.fujitsu.com>
Mon, 7 Jul 2014 06:26:57 +0000 (14:26 +0800)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 7 Jul 2014 06:51:43 +0000 (08:51 +0200)
We invoked virCgroupHasController twice for checking
VIR_CGROUP_CONTROLLER_DEVICES
in lxcDomainAttachDeviceDiskLive.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
src/lxc/lxc_driver.c

index fce16f2d04ab61e5ac97648fd42c9d703e9364db..9c006e9c2f1347e787e9fb2da45d46efaaa3a280 100644 (file)
@@ -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) |