cgroup: Implement cgroup_file_show()
authorTejun Heo <tj@kernel.org>
Sun, 28 Aug 2022 05:04:40 +0000 (19:04 -1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2022 16:08:44 +0000 (18:08 +0200)
commite2691f6b44ed2135bfd005ad5fbabac4f433a7a1
treea1f35cf32893a9f95c33930c00ca295aef701893
parent783bd07d095b722108725af11113795ee046ed0e
cgroup: Implement cgroup_file_show()

Add cgroup_file_show() which allows toggling visibility of a cgroup file
using the new kernfs_show(). This will be used to hide psi interface files
on cgroups where it's disabled.

Cc: Chengming Zhou <zhouchengming@bytedance.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Tested-by: Chengming Zhou <zhouchengming@bytedance.com>
Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20220828050440.734579-10-tj@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/cgroup.h
kernel/cgroup/cgroup.c