]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
fix virCgroupGetMemoryStat arguments order
authorDmitry Frolov <frolov@swemel.ru>
Mon, 4 Sep 2023 11:44:48 +0000 (14:44 +0300)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 5 Sep 2023 12:43:50 +0000 (14:43 +0200)
Reviewing the sources, I noticed that, argumets order in
virCgroupGetMemoryStat() function call does not correspond
to the function declaration:
-instead of   *activeAnon, &meminfo->inactive_anon is passed;
-instead of *inactiveAnon,   &meminfo->active_anon is passed;
-instead of   *activeFile, &meminfo->inactive_file is passed;
-instead of *inactiveFile,   &meminfo->active_file is passed.

Fixes: e634c7cd0d ("lxc: Use virCgroupGetMemoryStat")
Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/lxc/lxc_cgroup.c

index 1b516bba7306ae04195f9e1f4b8a644018e42936..bc39b16928ebe31ad7a12fa5b773ee61b3472d9d 100644 (file)
@@ -130,10 +130,10 @@ static int virLXCCgroupGetMemStat(virCgroup *cgroup,
 {
     return virCgroupGetMemoryStat(cgroup,
                                   &meminfo->cached,
-                                  &meminfo->inactive_anon,
                                   &meminfo->active_anon,
-                                  &meminfo->inactive_file,
+                                  &meminfo->inactive_anon,
                                   &meminfo->active_file,
+                                  &meminfo->inactive_file,
                                   &meminfo->unevictable);
 }