Vladimir Davydov 41f727fde1 fork/exec: cleanup mm initialization
mm initialization on fork/exec is spread all over the place, which makes
the code look inconsistent.

We have mm_init(), which is supposed to init/nullify mm's internals, but
it doesn't init all the fields it should:

 - on fork ->mmap,mm_rb,vmacache_seqnum,map_count,mm_cpumask,locked_vm
   are zeroed in dup_mmap();

 - on fork ->pmd_huge_pte is zeroed in dup_mm(), immediately before
   calling mm_init();

 - ->cpu_vm_mask_var ptr is initialized by mm_init_cpumask(), which is
   called before mm_init() on both fork and exec;

 - ->context is initialized by init_new_context(), which is called after
   mm_init() on both fork and exec;

Let's consolidate all the initializations in mm_init() to make the code
look cleaner.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:23 -07:00
..
2014-08-08 15:57:20 -07:00
2014-06-04 16:53:53 -07:00
2014-06-12 00:18:51 -04:00
2014-08-06 18:01:12 -07:00
2014-07-23 15:01:44 -07:00
2014-08-06 18:01:12 -07:00
2014-08-08 15:57:23 -07:00
2014-06-06 16:08:13 -07:00
2014-05-06 17:39:36 -04:00
2014-08-01 02:35:51 -04:00
2014-08-08 15:57:23 -07:00
2014-05-06 17:31:10 -04:00
2014-04-01 23:19:09 -04:00
2014-07-24 06:18:12 -04:00
2014-05-06 17:39:42 -04:00
2014-04-01 23:19:08 -04:00
2014-04-01 23:19:08 -04:00
2014-04-01 23:19:09 -04:00
2014-07-23 10:18:02 -07:00