[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260110040217.1927971-12-viro@zeniv.linux.org.uk>
Date: Sat, 10 Jan 2026 04:02:13 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: linux-mm@...ck.org
Cc: Vlastimil Babka <vbabka@...e.cz>,
Harry Yoo <harry.yoo@...cle.com>,
linux-fsdevel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Christian Brauner <brauner@...nel.org>,
Jan Kara <jack@...e.cz>,
Mateusz Guzik <mguzik@...il.com>,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH 11/15] turn mm_cachep static-duration
Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
---
kernel/fork.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index d5b7e4d51596..f83ca2f5826f 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -478,7 +478,8 @@ struct kmem_cache_opaque files_cache;
struct kmem_cache *fs_cachep;
/* SLAB cache for mm_struct structures (tsk->mm) */
-static struct kmem_cache *mm_cachep;
+static struct kmem_cache_opaque mm_cache;
+#define mm_cachep to_kmem_cache(&mm_cache)
static void account_kernel_stack(struct task_struct *tsk, int account)
{
@@ -3011,7 +3012,7 @@ void __init mm_cache_init(void)
*/
mm_size = sizeof(struct mm_struct) + cpumask_size() + mm_cid_size();
- mm_cachep = kmem_cache_create_usercopy("mm_struct",
+ kmem_cache_setup_usercopy(mm_cachep, "mm_struct",
mm_size, ARCH_MIN_MMSTRUCT_ALIGN,
SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT,
offsetof(struct mm_struct, saved_auxv),
--
2.47.3
Powered by blists - more mailing lists