Commit dc6f6c97f1d3d58fef81f0f9db0c7d068b2cf392

Authored by Oleg Nesterov
Committed by Linus Torvalds
1 parent 39af1765f1

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 <oleg@redhat.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Peter Chiang <pchiang@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 0 additions and 1 deletions Side-by-side Diff

... ... @@ -507,7 +507,6 @@
507 507 page_address_init();
508 508 pr_notice("%s", linux_banner);
509 509 setup_arch(&command_line);
510   - mm_init_owner(&init_mm, &init_task);
511 510 mm_init_cpumask(&init_mm);
512 511 setup_command_line(command_line);
513 512 setup_nr_cpu_ids();