From: Oleg Nesterov Date: Thu, 9 Oct 2014 22:25:41 +0000 (-0700) Subject: fs/proc/task_mmu.c: reintroduce m->version logic X-Git-Tag: fixes-against-v3.18-rc2~137^2~130 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8c20a9b85b057c850f63ee4c63531a356d8596a;p=pandora-kernel.git 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 Cc: Kirill A. Shutemov Cc: Cyrill Gorcunov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed