summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2014-09-10 09:40:20 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2014-09-10 09:40:20 +1000
commit9713dd05706e23213cabca6e6c64f9e3b6a74fa3 (patch)
treed0ee633ab0261ff1903da79245a44b0ef0b95113 /fs
parentb916398a8c85d51ce44ea2ed3d21dac147c52087 (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>
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/internal.h2
-rw-r--r--fs/proc/task_mmu.c4
-rw-r--r--fs/proc/task_nommu.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index d27182854a28..aa7a0ee182e1 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -268,7 +268,7 @@ extern int proc_remount(struct super_block *, int *, char *);
* task_[no]mmu.c
*/
struct proc_maps_private {
- struct pid *pid;
+ struct inode *inode;
struct task_struct *task;
struct mm_struct *mm;
#ifdef CONFIG_MMU
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index aceff2da0991..828ff49073d4 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -164,7 +164,7 @@ static void *m_start(struct seq_file *m, loff_t *ppos)
if (last_addr == -1UL)
return NULL;
- priv->task = get_pid_task(priv->pid, PIDTYPE_PID);
+ priv->task = get_proc_task(priv->inode);
if (!priv->task)
return ERR_PTR(-ESRCH);
@@ -231,7 +231,7 @@ static int proc_maps_open(struct inode *inode, struct file *file,
if (!priv)
return -ENOMEM;
- priv->pid = proc_pid(inode);
+ priv->inode = inode;
priv->mm = proc_mem_open(inode, PTRACE_MODE_READ);
if (IS_ERR(priv->mm)) {
int err = PTR_ERR(priv->mm);
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 8f157e43ddfe..f1cc3046ac8a 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)
loff_t n = *pos;
/* pin the task and mm whilst we play with them */
- priv->task = get_pid_task(priv->pid, PIDTYPE_PID);
+ priv->task = get_proc_task(priv->inode);
if (!priv->task)
return ERR_PTR(-ESRCH);
@@ -275,7 +275,7 @@ static int maps_open(struct inode *inode, struct file *file,
if (!priv)
return -ENOMEM;
- priv->pid = proc_pid(inode);
+ priv->inode = inode;
priv->mm = proc_mem_open(inode, PTRACE_MODE_READ);
if (IS_ERR(priv->mm)) {
int err = PTR_ERR(priv->mm);