diff options
Diffstat (limited to 'fs/proc/task_nommu.c')
| -rw-r--r-- | fs/proc/task_nommu.c | 39 | 
1 files changed, 4 insertions, 35 deletions
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index 5b62f57bd9bc..0b63d68dedb2 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c @@ -142,8 +142,7 @@ static int is_stack(struct vm_area_struct *vma)  /*   * display a single VMA to a sequenced file   */ -static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma, -			  int is_pid) +static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)  {  	struct mm_struct *mm = vma->vm_mm;  	unsigned long ino = 0; @@ -189,22 +188,11 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,  /*   * display mapping lines for a particular process's /proc/pid/maps   */ -static int show_map(struct seq_file *m, void *_p, int is_pid) +static int show_map(struct seq_file *m, void *_p)  {  	struct rb_node *p = _p; -	return nommu_vma_show(m, rb_entry(p, struct vm_area_struct, vm_rb), -			      is_pid); -} - -static int show_pid_map(struct seq_file *m, void *_p) -{ -	return show_map(m, _p, 1); -} - -static int show_tid_map(struct seq_file *m, void *_p) -{ -	return show_map(m, _p, 0); +	return nommu_vma_show(m, rb_entry(p, struct vm_area_struct, vm_rb));  }  static void *m_start(struct seq_file *m, loff_t *pos) @@ -260,14 +248,7 @@ static const struct seq_operations proc_pid_maps_ops = {  	.start	= m_start,  	.next	= m_next,  	.stop	= m_stop, -	.show	= show_pid_map -}; - -static const struct seq_operations proc_tid_maps_ops = { -	.start	= m_start, -	.next	= m_next, -	.stop	= m_stop, -	.show	= show_tid_map +	.show	= show_map  };  static int maps_open(struct inode *inode, struct file *file, @@ -308,11 +289,6 @@ static int pid_maps_open(struct inode *inode, struct file *file)  	return maps_open(inode, file, &proc_pid_maps_ops);  } -static int tid_maps_open(struct inode *inode, struct file *file) -{ -	return maps_open(inode, file, &proc_tid_maps_ops); -} -  const struct file_operations proc_pid_maps_operations = {  	.open		= pid_maps_open,  	.read		= seq_read, @@ -320,10 +296,3 @@ const struct file_operations proc_pid_maps_operations = {  	.release	= map_release,  }; -const struct file_operations proc_tid_maps_operations = { -	.open		= tid_maps_open, -	.read		= seq_read, -	.llseek		= seq_lseek, -	.release	= map_release, -}; -  |