summaryrefslogtreecommitdiff
path: root/fs/xfs/time.h
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2014-10-09 15:25:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-09 22:25:49 -0400
commitebb6cdde1a50c3cd2a0a4668dfb571ecb3213449 (patch)
tree766d8c75bf558af33354ffb5b304aa70db7dc7b5 /fs/xfs/time.h
parent0d5f5f45f9a4f1f6b694c37f5142ebea893f0a15 (diff)
fs/proc/task_mmu.c: kill the suboptimal and confusing m->version logic
m_start() carefully documents, checks, and sets "m->version = -1" if we are going to return NULL. The only problem is that we will be never called again if m_start() returns NULL, so this is simply pointless and misleading. Otoh, ->show() methods m->version = 0 if vma == tail_vma and this is just wrong, we want -1 in this case. And in fact we also want -1 if ->vm_next == NULL and ->tail_vma == NULL. And it is not used consistently, the "scan vmas" loop in m_start() should update last_addr too. Finally, imo the whole "last_addr" logic in m_start() looks horrible. find_vma(last_addr) is called unconditionally even if we are not going to use the result. But the main problem is that this code participates in tail_vma-or-NULL mess, and this looks simply unfixable. Remove this optimization. We will add it back after some cleanups. 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/xfs/time.h')
0 files changed, 0 insertions, 0 deletions