[PATCH v2 0/2] Minor namespace code simplication

From: Joel Savitz
Date: Thu May 08 2025 - 14:50:02 EST


The two patches are independent of each other. The first patch removes
unnecssary NULL guards from free_nsproxy() and create_new_namespaces()
in line with other usage of the put_*_ns() call sites. The second patch
slightly reduces the size of the kernel when CONFIG_CGROUPS is not
selected.

Joel Savitz (2):
kernel/nsproxy: remove unnecessary guards
include/cgroup: separate {get,put}_cgroup_ns no-op case

Changes from v1:
- now removing the guards instead of adding them where missing since
checking that all calls in the NULL case were already no-ops
- added second patch

include/linux/cgroup.h | 26 ++++++++++++++------------
kernel/nsproxy.c | 30 ++++++++++--------------------
2 files changed, 24 insertions(+), 32 deletions(-)

--
2.45.2