[libvirt] [PATCH] LXC: check whether we get MemSwap[Total|Usage]
Martin Kletzander
mkletzan at redhat.com
Wed Jun 25 05:24:42 UTC 2014
On Wed, Jun 25, 2014 at 09:57:32AM +0800, Chen Hanxiao wrote:
>Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
>---
> src/lxc/lxc_cgroup.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
>diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c
>index 8dfdc60..39e30ad 100644
>--- a/src/lxc/lxc_cgroup.c
>+++ b/src/lxc/lxc_cgroup.c
>@@ -288,8 +288,11 @@ int virLXCCgroupGetMeminfo(virLXCMeminfoPtr meminfo)
> if (virLXCCgroupGetMemUsage(cgroup, meminfo) < 0)
> goto cleanup;
>
>- virLXCCgroupGetMemSwapTotal(cgroup, meminfo);
>- virLXCCgroupGetMemSwapUsage(cgroup, meminfo);
>+ if (virLXCCgroupGetMemSwapTotal(cgroup, meminfo) < 0)
>+ goto cleanup;
>+
>+ if (virLXCCgroupGetMemSwapUsage(cgroup, meminfo) < 0)
>+ goto cleanup;
>
> ret = 0;
> cleanup:
>--
>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/20140625/4e811162/attachment-0001.sig>
More information about the libvir-list
mailing list