Re: [PATCH 1/2] kernel/cgroup: use kernfs_create_dir_ns()

From: Tejun Heo
Date: Fri Dec 01 2023 - 11:59:36 EST


Hello,

On Fri, Dec 01, 2023 at 01:56:37PM +0100, Max Kellermann wrote:
> 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 49957f8e2a ("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.
>
> Signed-off-by: Max Kellermann <max.kellermann@xxxxxxxxx>

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Greg, given that the two patches are related, it'd probably be less
confusing to route them together through your tree. If you want to route
them differently, please let me know.

Thanks.

--
tejun