cgroup: Remove unnecessary list_empty()
authorYafang Shao <laoar.shao@gmail.com>
Sun, 29 Oct 2023 06:14:28 +0000 (06:14 +0000)
committerTejun Heo <tj@kernel.org>
Thu, 9 Nov 2023 23:25:46 +0000 (13:25 -1000)
commit96a2b48e5e1df6698f504969f0f51dc34e52ff3d
tree512b40f7b232745e99b07fb26a4c347ff263b121
parenta12deb44f9734dc25970c266249b272e44d3d1b5
cgroup: Remove unnecessary list_empty()

The root hasn't been removed from the root_list, so the list can't be NULL.
However, if it had been removed, attempting to destroy it once more is not
possible. Let's replace this with WARN_ON_ONCE() for clarity.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cgroup.c