diff options
| -rw-r--r-- | fs/proc/task_mmu.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 45ae8ce0f..c89b2da34 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -196,7 +196,6 @@ static void vma_stop(struct proc_maps_private *priv) static void *m_start(struct seq_file *m, loff_t *pos) { struct proc_maps_private *priv = m->private; - unsigned long last_addr = m->version; struct mm_struct *mm; struct vm_area_struct *vma, *tail_vma = NULL; loff_t l = *pos; @@ -222,12 +221,6 @@ static void *m_start(struct seq_file *m, loff_t *pos) tail_vma = get_gate_vma(mm); priv->tail_vma = tail_vma; hold_task_mempolicy(priv); - /* Start with last addr hint */ - vma = find_vma(mm, last_addr); - if (last_addr && vma) { - vma = vma->vm_next; - goto out; - } /* * Check the vma index is within the range and do @@ -248,8 +241,6 @@ out: if (vma) return vma; - /* End of vmas has been reached */ - m->version = (tail_vma != NULL)? 0: -1UL; if (tail_vma) return tail_vma; @@ -421,14 +412,7 @@ done: static int show_map(struct seq_file *m, void *v, int is_pid) { - struct vm_area_struct *vma = v; - struct proc_maps_private *priv = m->private; - - show_map_vma(m, vma, is_pid); - - if (m->count < m->size) /* vma is copied successfully */ - m->version = (vma != priv->tail_vma) - ? vma->vm_start : 0; + show_map_vma(m, v, is_pid); return 0; } @@ -692,7 +676,6 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma) static int show_smap(struct seq_file *m, void *v, int is_pid) { - struct proc_maps_private *priv = m->private; struct vm_area_struct *vma = v; struct mem_size_stats mss; struct mm_walk smaps_walk = { @@ -760,9 +743,6 @@ static int show_smap(struct seq_file *m, void *v, int is_pid) seq_putc(m, '\n'); } - if (m->count < m->size) /* vma is copied successfully */ - m->version = (vma != priv->tail_vma) - ? vma->vm_start : 0; return 0; } @@ -1473,9 +1453,6 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) seq_printf(m, " N%d=%lu", n, md->node[n]); out: seq_putc(m, '\n'); - - if (m->count < m->size) - m->version = (vma != proc_priv->tail_vma) ? vma->vm_start : 0; return 0; } |
