From patchwork Tue Aug 20 19:50:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kanchana P Sridhar X-Patchwork-Id: 13770573 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD1E1C531DC for ; Tue, 20 Aug 2024 19:50:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 777676B0096; Tue, 20 Aug 2024 15:50:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 700696B0098; Tue, 20 Aug 2024 15:50:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A1516B0099; Tue, 20 Aug 2024 15:50:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3DD626B0096 for ; Tue, 20 Aug 2024 15:50:10 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 00F31A04F2 for ; Tue, 20 Aug 2024 19:50:09 +0000 (UTC) X-FDA: 82473664980.06.8E7B26E Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by imf08.hostedemail.com (Postfix) with ESMTP id 4353816002B for ; Tue, 20 Aug 2024 19:50:07 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=S7zpeFkH; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf08.hostedemail.com: domain of kanchana.p.sridhar@intel.com designates 198.175.65.9 as permitted sender) smtp.mailfrom=kanchana.p.sridhar@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724183320; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=nPwA/qDWbaHGUSSzlzlXfs+iZG0XYQa3Y/ygfaBPQKo=; b=btN4zXUbT3VbRbT4R0g0EFy8irIummVVLZoy3I8oVWo/IL8lFJ5kHA/wQgpFiZ0vnatOsW TheeIIx2fLWF3JplpoDCNxhdkkOJv9k9pfnjQHjK6QRXq+kG3nbpsa4KeZbU/H1+Cd58fP ls53gF0VRGe1rsA6nEDxFCBb66v33js= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724183320; a=rsa-sha256; cv=none; b=KwxLJ/h1nYUU/7Og+PQurlKsk/SdVZmo14nnVJwIDpSnzqsfU6fibVUNozrMq7Myh5KxcX Z1zPuZjkV2ZN7XL3zQwzaaHWE6QZPgQvt9rAu38ufOnLvvOIQp6rkb4KXteVAVqEYEEtin maIJX+7YAKDSWVJFjqNCNeFHICBc4jM= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=S7zpeFkH; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf08.hostedemail.com: domain of kanchana.p.sridhar@intel.com designates 198.175.65.9 as permitted sender) smtp.mailfrom=kanchana.p.sridhar@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724183407; x=1755719407; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=NR4mV13RpbYtBfGerxGaqEI3TdJr09SWWzNHh5/rsmo=; b=S7zpeFkHlXUuKCsFYtRZEJO6JLzVVN3PaCtkEYKmADsqK4fOrXu73yEU FeLQCY++UbuHYQ5iNn5tM780G341CIauELkk12MeB8A80sMtLPwKi3h2L ww5uHYkhI6U2gvPNu9Wk45QWi2vUccLwtko0cCAOu3InQl8Wdhzljwcys 8jJmz9atE6B1Ugit8vetBPGkJLz1vhrJgaapVL0cxVxfN+dePv66E50zZ D9QM93dxs1FzzjRXDtB9DekRJ4pDOKgv1Wvq4G7OCDMjUGsRC1Z3PlaCC UdsKFlvL6bWoXtk4r+qTawqndl9CSi7ChHrZMoztSjqBM3FCVS5R4Nl29 w==; X-CSE-ConnectionGUID: BteZzG0sRUa4hS8GAtb8xQ== X-CSE-MsgGUID: OZwxoWvnRkWbMWI+gdx2Sg== X-IronPort-AV: E=McAfee;i="6700,10204,11170"; a="45035597" X-IronPort-AV: E=Sophos;i="6.10,162,1719903600"; d="scan'208";a="45035597" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2024 12:50:05 -0700 X-CSE-ConnectionGUID: mACcrAWWQleDqbgJXDNrDw== X-CSE-MsgGUID: /4+TsTFhQG62uu2nFdW1Tw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,162,1719903600"; d="scan'208";a="91620355" Received: from jf5300-b11a338t.jf.intel.com ([10.242.51.6]) by fmviesa001.fm.intel.com with ESMTP; 20 Aug 2024 12:50:05 -0700 From: Kanchana P Sridhar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, hannes@cmpxchg.org, yosryahmed@google.com, nphamcs@gmail.com, ryan.roberts@arm.com, ying.huang@intel.com, 21cnbao@gmail.com, akpm@linux-foundation.org Cc: nanhai.zou@intel.com, wajdi.k.feghali@intel.com, vinodh.gopal@intel.com, kanchana.p.sridhar@intel.com Subject: [PATCH v1] mm: Defines obj_cgroup_get() if CONFIG_MEMCG is not defined. Date: Tue, 20 Aug 2024 12:50:05 -0700 Message-Id: <20240820195005.5941-1-kanchana.p.sridhar@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 4353816002B X-Stat-Signature: ejprysickr1nd9hpu9f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ca78U8jMGFfY8Y5/BbgrG1BaEAzXGQgtP9eA1nN6qjd2IxTlLBSBzJWJZDLNWAO6bJQAWzO5+tb5ROu9zjsN9nzcqUZ4JjRdQMB/cYbF/HKeXX0P1BtLInMr8hZjZBQDPQsSOenhfen0iK1dB1nuuAFB/7H0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This resolves an issue with obj_cgroup_get() not being defined if CONFIG_MEMCG is not defined. This causes build errors if obj_cgroup_get() is called from code that is agnostic of CONFIG_MEMCG. The patch resolves this. Signed-off-by: Kanchana P Sridhar --- include/linux/memcontrol.h | 4 ++++ 1 file changed, 4 insertions(+) base-commit: 7d0b0d4b77b368b2111fc8b4449e33dfb3c34087 diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index fe05fdb92779..f693d254ab2a 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -1281,6 +1281,10 @@ struct mem_cgroup *mem_cgroup_from_css(struct cgroup_subsys_state *css) return NULL; } +static inline void obj_cgroup_get(struct obj_cgroup *objcg) +{ +} + static inline void obj_cgroup_put(struct obj_cgroup *objcg) { }