fs/proc/task_nommu.c: shift mm_access() from m_start() to proc_maps_open()
authorOleg Nesterov <oleg@redhat.com>
Thu, 9 Oct 2014 22:25:47 +0000 (15:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 10 Oct 2014 02:25:49 +0000 (22:25 -0400)
commit27692cd56e2aa6924b49f4361247d707a023484a
tree285d080f84f97f4cf46e90522b6121bf9dac84c0
parentce34fddb5bafb424a4aaa9f403feb7dbe776c7d1
fs/proc/task_nommu.c: shift mm_access() from m_start() to proc_maps_open()

Copy-and-paste the changes from "fs/proc/task_mmu.c: shift mm_access()
from m_start() to proc_maps_open()" into task_nommu.c.

Change maps_open() to initialize priv->mm using proc_mem_open(), m_start()
can rely on atomic_inc_not_zero(mm_users) like task_mmu.c does.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/task_nommu.c