aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/task_nommu.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2014-10-09 18:25:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-09 22:25:50 -0400
commit2c03376d2db005869b1d4449097d51c96196529e (patch)
treecb372cc5bc0b4cb9813a5e70df3f6d5c2fa040b6 /fs/proc/task_nommu.c
parent47fecca15c0944924423390fe21b956eea57da30 (diff)
proc/maps: replace proc_maps_private->pid with "struct inode *inode"
m_start() can use get_proc_task() instead, and "struct inode *" provides more potentially useful info, see the next changes. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Greg Ungerer <gerg@uclinux.org> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/task_nommu.c')
-rw-r--r--fs/proc/task_nommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 429cb7a5419e..f36e213835cc 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -212,7 +212,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
212 loff_t n = *pos; 212 loff_t n = *pos;
213 213
214 /* pin the task and mm whilst we play with them */ 214 /* pin the task and mm whilst we play with them */
215 priv->task = get_pid_task(priv->pid, PIDTYPE_PID); 215 priv->task = get_proc_task(priv->inode);
216 if (!priv->task) 216 if (!priv->task)
217 return ERR_PTR(-ESRCH); 217 return ERR_PTR(-ESRCH);
218 218
@@ -276,7 +276,7 @@ static int maps_open(struct inode *inode, struct file *file,
276 if (!priv) 276 if (!priv)
277 return -ENOMEM; 277 return -ENOMEM;
278 278
279 priv->pid = proc_pid(inode); 279 priv->inode = inode;
280 priv->mm = proc_mem_open(inode, PTRACE_MODE_READ); 280 priv->mm = proc_mem_open(inode, PTRACE_MODE_READ);
281 if (IS_ERR(priv->mm)) { 281 if (IS_ERR(priv->mm)) {
282 int err = PTR_ERR(priv->mm); 282 int err = PTR_ERR(priv->mm);