LXC: check whether we get MemSwap[Total|Usage]

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
Chen Hanxiao 2014-06-25 09:57:32 +08:00 committed by Martin Kletzander
parent aa990efe97
commit ae38288b8a

View File

@ -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: