diff options
| author | Oleg Nesterov <oleg@redhat.com> | 2014-10-09 15:25:36 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-09-28 15:15:11 +0200 |
| commit | 6975fae1c8ebc027dc8580eecb53f1b2bbe5f58c (patch) | |
| tree | b22fd430559170fa9c34d0cd795ceb1476542501 /kernel/exec_domain.c | |
| parent | d117ddb5a40c31f1d66a9785e1c0f1767bed978d (diff) | |
fs/proc/task_mmu.c: simplify m_start() to make it readable
Now that m->version is gone we can cleanup m_start(). In particular,
- Remove the "unsigned long" typecast, m->index can't be negative
or exceed ->map_count. But lets use "unsigned int pos" to make
it clear that "pos < map_count" is safe.
- Remove the unnecessary "vma != NULL" check in the main loop. It
can't be NULL unless we have a vm bug.
- This also means that "pos < map_count" case can simply return the
valid vma and avoid "goto" and subsequent checks.
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: W4TCH0UT <ateekujjawal@gmail.com>
Diffstat (limited to 'kernel/exec_domain.c')
0 files changed, 0 insertions, 0 deletions
