diff options
Diffstat (limited to 'fs/proc/task_nommu.c')
-rw-r--r-- | fs/proc/task_nommu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index d8b8c7183c24..1932c2ca3457 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c | |||
@@ -165,15 +165,13 @@ static void *m_start(struct seq_file *m, loff_t *pos) | |||
165 | if (!priv->task) | 165 | if (!priv->task) |
166 | return NULL; | 166 | return NULL; |
167 | 167 | ||
168 | mm = get_task_mm(priv->task); | 168 | mm = mm_for_maps(priv->task); |
169 | if (!mm) { | 169 | if (!mm) { |
170 | put_task_struct(priv->task); | 170 | put_task_struct(priv->task); |
171 | priv->task = NULL; | 171 | priv->task = NULL; |
172 | return NULL; | 172 | return NULL; |
173 | } | 173 | } |
174 | 174 | ||
175 | down_read(&mm->mmap_sem); | ||
176 | |||
177 | /* start from the Nth VMA */ | 175 | /* start from the Nth VMA */ |
178 | for (vml = mm->context.vmlist; vml; vml = vml->next) | 176 | for (vml = mm->context.vmlist; vml; vml = vml->next) |
179 | if (n-- == 0) | 177 | if (n-- == 0) |