mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
cgroup: implement CFTYPE_NO_PREFIX
When cgroup files are created, cgroup core automatically prepends the name of the subsystem as prefix. This patch adds CFTYPE_NO_ which disables the automatic prefix. This is to work around historical baggages and shouldn't be used for new files. This will be used to move "cgroup.event_control" from cgroup core to memcg. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Glauber Costa <glommer@gmail.com>
This commit is contained in:
parent
ca8bdcaff0
commit
9fa4db334c
2 changed files with 3 additions and 1 deletions
|
|
@ -2756,7 +2756,8 @@ static int cgroup_add_file(struct cgroup *cgrp, struct cftype *cft)
|
|||
umode_t mode;
|
||||
char name[MAX_CGROUP_TYPE_NAMELEN + MAX_CFTYPE_NAME + 2] = { 0 };
|
||||
|
||||
if (cft->ss && !(cgrp->root->flags & CGRP_ROOT_NOPREFIX)) {
|
||||
if (cft->ss && !(cft->flags & CFTYPE_NO_PREFIX) &&
|
||||
!(cgrp->root->flags & CGRP_ROOT_NOPREFIX)) {
|
||||
strcpy(name, cft->ss->name);
|
||||
strcat(name, ".");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue