summaryrefslogtreecommitdiff
path: root/fs/kernfs
diff options
context:
space:
mode:
authorMax Kellermann <max.kellermann@ionos.com>2023-12-08 10:33:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-15 17:22:40 +0100
commitfe3de0102bc830e78d80dbf6e2dd29c520d68575 (patch)
treefd1edfbf38c013c5a70cfe79947e89d3a744791d /fs/kernfs
parent7c23fb2e6e3b40db5abbead64842060f13c4bb15 (diff)
kernel/cgroup: use kernfs_create_dir_ns()
By passing the fsugid to kernfs_create_dir_ns(), we don't need cgroup_kn_set_ugid() any longer. That function was added for exactly this purpose by commit 49957f8e2a43 ("cgroup: newly created dirs and files should be owned by the creator"). Eliminating this piece of duplicate code means we benefit from future improvements to kernfs_create_dir_ns(); for example, both are lacking S_ISGID support currently, which my next patch will add to kernfs_create_dir_ns(). It cannot (easily) be added to cgroup_kn_set_ugid() because we can't dereference struct kernfs_iattrs from there. -- v1 -> v2: 12-digit commit id Signed-off-by: Max Kellermann <max.kellermann@ionos.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20231208093310.297233-1-max.kellermann@ionos.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/kernfs')
0 files changed, 0 insertions, 0 deletions