diff options
author | Shaohua Li <shli@fb.com> | 2017-07-12 20:49:51 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-07-29 17:00:03 +0200 |
commit | aa8188253474b4053bc2900d9fcb545ce68bdf5c (patch) | |
tree | 7d7afd563e9f2cd46cf8c0a0299aab42fcf764e9 /kernel/cgroup | |
parent | kernfs: introduce kernfs_node_id (diff) | |
download | linux-aa8188253474b4053bc2900d9fcb545ce68bdf5c.tar.xz linux-aa8188253474b4053bc2900d9fcb545ce68bdf5c.zip |
kernfs: add exportfs operations
Now we have the facilities to implement exportfs operations. The idea is
cgroup can export the fhandle info to userspace, then userspace uses
fhandle to find the cgroup name. Another example is userspace can get
fhandle for a cgroup and BPF uses the fhandle to filter info for the
cgroup.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'kernel/cgroup')
-rw-r--r-- | kernel/cgroup/cgroup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 620794a20a33..6cefa277f39c 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -1737,7 +1737,8 @@ int cgroup_setup_root(struct cgroup_root *root, u16 ss_mask, int ref_flags) &cgroup_kf_syscall_ops : &cgroup1_kf_syscall_ops; root->kf_root = kernfs_create_root(kf_sops, - KERNFS_ROOT_CREATE_DEACTIVATED, + KERNFS_ROOT_CREATE_DEACTIVATED | + KERNFS_ROOT_SUPPORT_EXPORTOP, root_cgrp); if (IS_ERR(root->kf_root)) { ret = PTR_ERR(root->kf_root); |