diff options
author | Oleg Nesterov <oleg@redhat.com> | 2014-10-09 15:25:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 22:25:49 -0400 |
commit | b8c20a9b85b057c850f63ee4c63531a356d8596a (patch) | |
tree | 474512d1a811633ea3150dd2bd884d11ed47b5d2 /fs/splice.c | |
parent | ad2a00e4b7e20ab03700b0bb13270b6cee45c6e0 (diff) | |
download | op-kernel-dev-b8c20a9b85b057c850f63ee4c63531a356d8596a.zip op-kernel-dev-b8c20a9b85b057c850f63ee4c63531a356d8596a.tar.gz |
fs/proc/task_mmu.c: reintroduce m->version logic
Add the "last_addr" optimization back. Like before, every ->show()
method checks !seq_overflow() and sets m->version = vma->vm_start.
However, it also checks that m_next_vma(vma) != NULL, otherwise it
sets m->version = -1 for the lockless "EOF" fast-path in m_start().
m_start() can simply do find_vma() + m_next_vma() if last_addr is
not zero, the code looks clear and simple and this case is clearly
separated from "scan vmas" path.
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>
Diffstat (limited to 'fs/splice.c')
0 files changed, 0 insertions, 0 deletions