cgroup: let a symlink too be created with a cftype file

This commit enables a cftype to have a symlink (of any name) that
points to the file associated with the cftype.

Signed-off-by: Angelo Ruocco <angeloruocco90@gmail.com>
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Angelo Ruocco 2019-05-21 10:01:54 +02:00 committed by Jens Axboe
parent c3e2219216
commit 54b7b868e8
2 changed files with 32 additions and 4 deletions

View file

@ -106,6 +106,8 @@ enum {
CFTYPE_WORLD_WRITABLE = (1 << 4), /* (DON'T USE FOR NEW FILES) S_IWUGO */
CFTYPE_DEBUG = (1 << 5), /* create when cgroup_debug */
CFTYPE_SYMLINKED = (1 << 6), /* pointed to by symlink too */
/* internal flags, do not use outside cgroup core proper */
__CFTYPE_ONLY_ON_DFL = (1 << 16), /* only on default hierarchy */
__CFTYPE_NOT_ON_DFL = (1 << 17), /* not on default hierarchy */
@ -543,6 +545,7 @@ struct cftype {
* end of cftype array.
*/
char name[MAX_CFTYPE_NAME];
char link_name[MAX_CFTYPE_NAME];
unsigned long private;
/*