diff options
author | Tejun Heo <tj@kernel.org> | 2018-11-13 12:03:33 -0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2018-11-13 12:09:48 -0800 |
commit | b1e3aeb11c5e86ee0988a038c4e7682d6beaa977 (patch) | |
tree | 0f09319a493a92ae2a92611d6e43bab75018c16f /kernel/cgroup | |
parent | 5cf8114d6e90b3822be5eb6a2faedf99d1c08f77 (diff) | |
download | linux-b1e3aeb11c5e86ee0988a038c4e7682d6beaa977.tar.bz2 |
cpuset: Minor cgroup2 interface updates
* Rename the partition file from "cpuset.sched.partition" to
"cpuset.cpus.partition".
* When writing to the partition file, drop "0" and "1" and only accept
"member" and "root".
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Waiman Long <longman@redhat.com>
Diffstat (limited to 'kernel/cgroup')
-rw-r--r-- | kernel/cgroup/cpuset.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index b897314bab53..1151e93d71b6 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -2468,11 +2468,11 @@ static ssize_t sched_partition_write(struct kernfs_open_file *of, char *buf, buf = strstrip(buf); /* - * Convert "root"/"1" to 1, and convert "member"/"0" to 0. + * Convert "root" to ENABLED, and convert "member" to DISABLED. */ - if (!strcmp(buf, "root") || !strcmp(buf, "1")) + if (!strcmp(buf, "root")) val = PRS_ENABLED; - else if (!strcmp(buf, "member") || !strcmp(buf, "0")) + else if (!strcmp(buf, "member")) val = PRS_DISABLED; else return -EINVAL; @@ -2631,7 +2631,7 @@ static struct cftype dfl_files[] = { }, { - .name = "sched.partition", + .name = "cpus.partition", .seq_show = sched_partition_show, .write = sched_partition_write, .private = FILE_PARTITION_ROOT, |