From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEE7727875C for ; Thu, 8 May 2025 18:49:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746730180; cv=none; b=caFnppGxsNsA5DZKsdTLW2AOzN2avEy1w4KgiL287qkV3XTM5m1sLXqMXpbl1FFjcVfSj1DiXmB8DxmGu7yx+9yrrDT35Q5NzSx4XvLPh2NE0jtyMusJlvGezpgdCAkubQhgXvZaxoGCWw0c+W3AYlXYT/A3gPY3fBWRGTq8e7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746730180; c=relaxed/simple; bh=jK92st7X0klV03+jG2bTxf99xWy4odtdMf2NoHOPdXs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Ogxnf7pi/LI+7BTpMd6+PSWE37kuNLXeJ1VCu1QJA7+gjZdRdcqV54bTI93ITrYr3hzJP/+qgtcLXMY/zGcZiQZ2gCiTAkr0MW57b0rScdqqzT5pUBMKKM6B8PnhSUOv6nwtLPYojntxO7D9gMCodZcOKl1Oe/ydpgvQtHTc0Bk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Ptjbcfql; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ptjbcfql" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1746730177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=IW0+4MWM9x9LMl+OAQiFn/VAiGTBHRX4k1GUGskDHkE=; b=PtjbcfqluCyCpG2s6p9oXtMp5zTv9wjla3J+EelppwhkpwGP6l1ii7RKx7LSLD5pLis9aT ELz25Nrrkz0BuJb03SswaJ2NsVCcDc/Yco88i5cjhnF9W0mLtYUhsulNkvu5NUqV/nI1Lq Pvx3j7tQHOooEAhyczrGPegRMPpyV7A= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-528-1IEsC-AOM4yIUb1O4Y_kdg-1; Thu, 08 May 2025 14:49:36 -0400 X-MC-Unique: 1IEsC-AOM4yIUb1O4Y_kdg-1 X-Mimecast-MFC-AGG-ID: 1IEsC-AOM4yIUb1O4Y_kdg_1746730174 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 74F191955DE8; Thu, 8 May 2025 18:49:34 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.80.242]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7458618004A7; Thu, 8 May 2025 18:49:32 +0000 (UTC) From: Joel Savitz To: linux-kernel@vger.kernel.org Cc: Joel Savitz , Tejun Heo , Johannes Weiner , =?UTF-8?q?Michal=20Koutn=C3=BD?= , Christian Brauner , Al Viro , cgroups@vger.kernel.org Subject: [PATCH v2 0/2] Minor namespace code simplication Date: Thu, 8 May 2025 14:49:28 -0400 Message-ID: <20250508184930.183040-1-jsavitz@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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