diff options
Diffstat (limited to 'fs/proc/task_nommu.c')
-rw-r--r-- | fs/proc/task_nommu.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index 1932c2ca3457..8011528518bd 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c | |||
@@ -12,7 +12,7 @@ | |||
12 | * each process that owns it. Non-shared memory is counted | 12 | * each process that owns it. Non-shared memory is counted |
13 | * accurately. | 13 | * accurately. |
14 | */ | 14 | */ |
15 | char *task_mem(struct mm_struct *mm, char *buffer) | 15 | void task_mem(struct seq_file *m, struct mm_struct *mm) |
16 | { | 16 | { |
17 | struct vm_list_struct *vml; | 17 | struct vm_list_struct *vml; |
18 | unsigned long bytes = 0, sbytes = 0, slack = 0; | 18 | unsigned long bytes = 0, sbytes = 0, slack = 0; |
@@ -58,14 +58,13 @@ char *task_mem(struct mm_struct *mm, char *buffer) | |||
58 | 58 | ||
59 | bytes += kobjsize(current); /* includes kernel stack */ | 59 | bytes += kobjsize(current); /* includes kernel stack */ |
60 | 60 | ||
61 | buffer += sprintf(buffer, | 61 | seq_printf(m, |
62 | "Mem:\t%8lu bytes\n" | 62 | "Mem:\t%8lu bytes\n" |
63 | "Slack:\t%8lu bytes\n" | 63 | "Slack:\t%8lu bytes\n" |
64 | "Shared:\t%8lu bytes\n", | 64 | "Shared:\t%8lu bytes\n", |
65 | bytes, slack, sbytes); | 65 | bytes, slack, sbytes); |
66 | 66 | ||
67 | up_read(&mm->mmap_sem); | 67 | up_read(&mm->mmap_sem); |
68 | return buffer; | ||
69 | } | 68 | } |
70 | 69 | ||
71 | unsigned long task_vsize(struct mm_struct *mm) | 70 | unsigned long task_vsize(struct mm_struct *mm) |
@@ -104,7 +103,7 @@ int task_statm(struct mm_struct *mm, int *shared, int *text, | |||
104 | return size; | 103 | return size; |
105 | } | 104 | } |
106 | 105 | ||
107 | int proc_exe_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt) | 106 | int proc_exe_link(struct inode *inode, struct path *path) |
108 | { | 107 | { |
109 | struct vm_list_struct *vml; | 108 | struct vm_list_struct *vml; |
110 | struct vm_area_struct *vma; | 109 | struct vm_area_struct *vma; |
@@ -127,8 +126,8 @@ int proc_exe_link(struct inode *inode, struct dentry **dentry, struct vfsmount * | |||
127 | } | 126 | } |
128 | 127 | ||
129 | if (vma) { | 128 | if (vma) { |
130 | *mnt = mntget(vma->vm_file->f_path.mnt); | 129 | *path = vma->vm_file->f_path; |
131 | *dentry = dget(vma->vm_file->f_path.dentry); | 130 | path_get(&vma->vm_file->f_path); |
132 | result = 0; | 131 | result = 0; |
133 | } | 132 | } |
134 | 133 | ||
@@ -199,7 +198,7 @@ static void *m_next(struct seq_file *m, void *_vml, loff_t *pos) | |||
199 | return vml ? vml->next : NULL; | 198 | return vml ? vml->next : NULL; |
200 | } | 199 | } |
201 | 200 | ||
202 | static struct seq_operations proc_pid_maps_ops = { | 201 | static const struct seq_operations proc_pid_maps_ops = { |
203 | .start = m_start, | 202 | .start = m_start, |
204 | .next = m_next, | 203 | .next = m_next, |
205 | .stop = m_stop, | 204 | .stop = m_stop, |