Skip to content

Commit 1240ea0

Browse files
Michal Hockotorvalds
authored andcommitted
fs, proc: remove priv argument from is_stack
Commit b18cb64 ("fs/proc: Stop trying to report thread stacks") removed the priv parameter user in is_stack so the argument is redundant. Drop it. [arnd@arndb.de: remove unused variable] Link: http://lkml.kernel.org/r/20170801120150.1520051-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20170728075833.7241-1-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 149728e commit 1240ea0

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

‎fs/proc/task_mmu.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ static int do_maps_open(struct inode *inode, struct file *file,
268268
* Indicate if the VMA is a stack for the given task; for
269269
* /proc/PID/maps that is the stack of the main task.
270270
*/
271-
static int is_stack(struct proc_maps_private *priv,
272-
struct vm_area_struct *vma)
271+
static int is_stack(struct vm_area_struct *vma)
273272
{
274273
/*
275274
* We make no effort to guess what a given thread considers to be
@@ -302,7 +301,6 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
302301
{
303302
struct mm_struct *mm = vma->vm_mm;
304303
struct file *file = vma->vm_file;
305-
struct proc_maps_private *priv = m->private;
306304
vm_flags_t flags = vma->vm_flags;
307305
unsigned long ino = 0;
308306
unsigned long long pgoff = 0;
@@ -350,7 +348,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
350348
goto done;
351349
}
352350

353-
if (is_stack(priv, vma))
351+
if (is_stack(vma))
354352
name = "[stack]";
355353
}
356354

@@ -1768,7 +1766,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
17681766
seq_file_path(m, file, "\n\t= ");
17691767
} else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
17701768
seq_puts(m, " heap");
1771-
} else if (is_stack(proc_priv, vma)) {
1769+
} else if (is_stack(vma)) {
17721770
seq_puts(m, " stack");
17731771
}
17741772

‎fs/proc/task_nommu.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ unsigned long task_statm(struct mm_struct *mm,
125125
return size;
126126
}
127127

128-
static int is_stack(struct proc_maps_private *priv,
129-
struct vm_area_struct *vma)
128+
static int is_stack(struct vm_area_struct *vma)
130129
{
131130
struct mm_struct *mm = vma->vm_mm;
132131

@@ -178,7 +177,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
178177
if (file) {
179178
seq_pad(m, ' ');
180179
seq_file_path(m, file, "");
181-
} else if (mm && is_stack(priv, vma)) {
180+
} else if (mm && is_stack(vma)) {
182181
seq_pad(m, ' ');
183182
seq_printf(m, "[stack]");
184183
}

0 commit comments

Comments
 (0)