diff mbox series

[5/6] API/cgroup: Add memory.min

Message ID 20220127061225.23368-6-rpalethorpe@suse.com
State Accepted
Headers show
Series Add memcontrol03 and declarative CG API | expand

Commit Message

Richard Palethorpe Jan. 27, 2022, 6:12 a.m. UTC
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
 lib/tst_cgroup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
index 2c63dca54..784f629d8 100644
--- a/lib/tst_cgroup.c
+++ b/lib/tst_cgroup.c
@@ -152,6 +152,7 @@  static const struct cgroup_file cgroup_ctrl_files[] = {
 
 static const struct cgroup_file memory_ctrl_files[] = {
 	{ "memory.current", "memory.usage_in_bytes", CTRL_MEMORY },
+	{ "memory.min", NULL, CTRL_MEMORY },
 	{ "memory.max", "memory.limit_in_bytes", CTRL_MEMORY },
 	{ "memory.stat", "memory.stat", CTRL_MEMORY },
 	{ "memory.swappiness", "memory.swappiness", CTRL_MEMORY },
@@ -888,7 +889,7 @@  tst_cgroup_group_mk(const struct tst_cgroup_group *const parent,
 
 	for_each_dir(parent, 0, dir) {
 		new_dir = SAFE_MALLOC(sizeof(*new_dir));
-		cgroup_dir_mk(*dir, group_name, new_dir);
+		cgroup_dir_mk(*dir, cg->group_name, new_dir);
 		cgroup_group_add_dir(parent, cg, new_dir);
 	}