Skip to content

Commit

Permalink
cgroup: fix cgroup prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
lateautumn233 committed Feb 3, 2024
1 parent 1f8604d commit a72032e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kernel/cgroup/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -4012,6 +4012,10 @@ static int cgroup_add_file(struct cgroup_subsys_state *css, struct cgroup *cgrp,
cfile->kn = kn;
spin_unlock_irq(&cgroup_file_kn_lock);
}
if (cft->ss && (cgrp->root->flags & CGRP_ROOT_NOPREFIX) && !(cft->flags & CFTYPE_NO_PREFIX)) {
snprintf(name, CGROUP_FILE_NAME_MAX, "%s.%s", cft->ss->name, cft->name);
kernfs_create_link(cgrp->kn, name, kn);
}

return 0;
}
Expand Down

0 comments on commit a72032e

Please sign in to comment.