[libvirt] [PATCH] LXC: remove duplicate controller check code

Martin Kletzander mkletzan at redhat.com
Mon Jul 7 07:22:44 UTC 2014


On Mon, Jul 07, 2014 at 02:26:57PM +0800, Chen Hanxiao wrote:
>We invoked virCgroupHasController twice for checking
>VIR_CGROUP_CONTROLLER_DEVICES
>in lxcDomainAttachDeviceDiskLive.
>
>Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
>---
> src/lxc/lxc_driver.c | 6 ------
> 1 file changed, 6 deletions(-)
>
>diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
>index fce16f2..9c006e9 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) |
>--
>1.9.0
>

ACK && Pushed.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140707/84ee88dc/attachment-0001.sig>


More information about the libvir-list mailing list