From c06d5fd56b06426fc2608a106ab8af8ceb8a2d5d Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Wed, 14 May 2014 10:01:57 +1000 Subject: [PATCH] memcg: kill start_kernel()->mm_init_owner(&init_mm) Remove start_kernel()->mm_init_owner(&init_mm, &init_task). This doesn't really hurt but unnecessary and misleading. init_task is the "swapper" thread == current, its ->mm is always NULL. And init_mm can only be used as ->active_mm, not as ->mm. mm_init_owner() has a single caller with this patch, perhaps it should die. mm_init() can initialize ->owner under #ifdef. Signed-off-by: Oleg Nesterov Reviewed-by: Michal Hocko Cc: Balbir Singh Cc: Johannes Weiner Cc: KAMEZAWA Hiroyuki Cc: Michal Hocko Cc: Peter Chiang Signed-off-by: Andrew Morton --- init/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/init/main.c b/init/main.c index 48655ceb66f4..e08c0b2065a1 100644 --- a/init/main.c +++ b/init/main.c @@ -507,7 +507,6 @@ asmlinkage __visible void __init start_kernel(void) page_address_init(); pr_notice("%s", linux_banner); setup_arch(&command_line); - mm_init_owner(&init_mm, &init_task); mm_init_cpumask(&init_mm); setup_command_line(command_line); setup_nr_cpu_ids(); -- 2.39.5