diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/task_mmu.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index fdbed8370db6..b7e31836a005 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -210,15 +210,13 @@ out: static void *m_next(struct seq_file *m, void *v, loff_t *pos) { struct proc_maps_private *priv = m->private; - struct vm_area_struct *vma = v; struct vm_area_struct *tail_vma = priv->tail_vma; - struct vm_area_struct *next; + struct vm_area_struct *vma = v, *next = NULL; (*pos)++; - if (vma && (vma != tail_vma) && vma->vm_next) - return vma->vm_next; + if (vma != tail_vma) + next = vma->vm_next ?: tail_vma; - next = (vma != tail_vma) ? tail_vma : NULL; if (!next) vma_stop(priv); return next; |