Re: [PATCH v2 2/2] include/cgroup: separate {get,put}_cgroup_ns no-op case

From: Michal Koutný
Date: Fri May 09 2025 - 09:36:08 EST


On Thu, May 08, 2025 at 02:49:30PM -0400, Joel Savitz <jsavitz@xxxxxxxxxx> wrote:
> When CONFIG_CGROUPS is not selected, {get,put}_cgroup_ns become no-ops
> and therefore it is not necessary to compile in the code for changing
> the reference count.
>
> When CONFIG_CGROUP is selected, there is no valid case where
> either of {get,put}_cgroup_ns() will be called with a NULL argument.
>
> Signed-off-by: Joel Savitz <jsavitz@xxxxxxxxxx>
> ---
> include/linux/cgroup.h | 26 ++++++++++++++------------
> 1 file changed, 14 insertions(+), 12 deletions(-)

Acked-by: Michal Koutný <mkoutny@xxxxxxxx>

Attachment: signature.asc
Description: PGP signature