]> www.infradead.org Git - users/willy/xarray.git/commit
cgroup: Minor reorganization of cgroup_create()
authorTejun Heo <tj@kernel.org>
Wed, 14 May 2025 04:43:41 +0000 (00:43 -0400)
committerTejun Heo <tj@kernel.org>
Thu, 22 May 2025 19:19:57 +0000 (09:19 -1000)
commitcd22cbad1b800e55f5bd38c58be16f9d0b171d9a
treed0b807182dd227a90029cdd67f2abc76ae6d7bca
parentd16e7994c8b2ed38beb8bae6f4b1292987b627af
cgroup: Minor reorganization of cgroup_create()

cgroup_bpf init and exit handling will be moved to a notifier chain. In
prepartion, reorganize cgroup_create() a bit so that the new cgroup is fully
initialized before any outside changes are made.

- cgrp->ancestors[] initialization and the hierarchical nr_descendants and
  nr_frozen_descendants updates were in the same loop. Separate them out and
  do the former earlier and do the latter later.

- Relocate cgroup_bpf_inherit() call so that it's after all cgroup
  initializations are complete.

No visible behavior changes expected.

Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cgroup.c