From: Boris Burkov <boris@bur.io>
To: akpm@linux-foundation.org
Cc: linux-btrfs@vger.kernel.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org, kernel-team@fb.com,
shakeel.butt@linux.dev, wqu@suse.com, willy@infradead.org,
mhocko@kernel.org, muchun.song@linux.dev,
roman.gushchin@linux.dev, hannes@cmpxchg.org
Subject: [PATCH] mm: fix CONFIG_MEMCG build for AS_KERNEL_FILE
Date: Thu, 21 Aug 2025 15:51:22 -0700 [thread overview]
Message-ID: <6de59ddeec81b5c294d337c001ba0061631d4ec6.1755816635.git.boris@bur.io> (raw)
In-Reply-To: <f09c4e2c90351d4cb30a1969f7a863b9238bd291.1755812945.git.boris@bur.io>
this needs to be folded into
mm/filemap: add AS_KERNEL_FILE
for it to build with CONFIG_MEMCG unset. Apologies for the churn.
Signed-off-by: Boris Burkov <boris@bur.io>
---
include/linux/memcontrol.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 9fa3afc90dd5..e693978b2022 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -1059,6 +1059,8 @@ extern int mem_cgroup_init(void);
#define MEM_CGROUP_ID_SHIFT 0
+#define root_mem_cgroup (NULL)
+
static inline struct mem_cgroup *folio_memcg(struct folio *folio)
{
return NULL;
--
2.50.1
next prev parent reply other threads:[~2025-08-21 22:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 21:55 [PATCH v4 0/3] introduce kernel file mapped folios Boris Burkov
2025-08-21 21:55 ` [PATCH v4 1/3] mm/filemap: add AS_KERNEL_FILE Boris Burkov
2025-08-21 22:25 ` Shakeel Butt
2025-08-21 22:51 ` Boris Burkov [this message]
2025-08-22 13:46 ` kernel test robot
2025-08-21 21:55 ` [PATCH v4 2/3] mm: add vmstat for kernel_file pages Boris Burkov
2025-08-21 21:55 ` [PATCH v4 3/3] btrfs: set AS_KERNEL_FILE on the btree_inode Boris Burkov
2025-08-27 17:47 ` [PATCH v4 0/3] introduce kernel file mapped folios Shakeel Butt
2025-08-29 1:52 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6de59ddeec81b5c294d337c001ba0061631d4ec6.1755816635.git.boris@bur.io \
--to=boris@bur.io \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=willy@infradead.org \
--cc=wqu@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox