diff options
-rw-r--r-- | fs/proc/base.c | 11 | ||||
-rw-r--r-- | fs/proc/root.c | 8 |
2 files changed, 1 insertions, 18 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index cbe454e94af8..6177fc238fdb 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -2714,19 +2714,12 @@ static int fake_filldir(void *buf, const char *name, int namelen, | |||
2714 | /* for the /proc/ directory itself, after non-process stuff has been done */ | 2714 | /* for the /proc/ directory itself, after non-process stuff has been done */ |
2715 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir) | 2715 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir) |
2716 | { | 2716 | { |
2717 | unsigned int nr; | ||
2718 | struct task_struct *reaper; | ||
2719 | struct tgid_iter iter; | 2717 | struct tgid_iter iter; |
2720 | struct pid_namespace *ns; | 2718 | struct pid_namespace *ns; |
2721 | filldir_t __filldir; | 2719 | filldir_t __filldir; |
2722 | 2720 | ||
2723 | if (filp->f_pos >= PID_MAX_LIMIT + TGID_OFFSET) | 2721 | if (filp->f_pos >= PID_MAX_LIMIT + TGID_OFFSET) |
2724 | goto out_no_task; | 2722 | goto out; |
2725 | nr = filp->f_pos - FIRST_PROCESS_ENTRY; | ||
2726 | |||
2727 | reaper = get_proc_task(filp->f_path.dentry->d_inode); | ||
2728 | if (!reaper) | ||
2729 | goto out_no_task; | ||
2730 | 2723 | ||
2731 | ns = filp->f_dentry->d_sb->s_fs_info; | 2724 | ns = filp->f_dentry->d_sb->s_fs_info; |
2732 | iter.task = NULL; | 2725 | iter.task = NULL; |
@@ -2747,8 +2740,6 @@ int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir) | |||
2747 | } | 2740 | } |
2748 | filp->f_pos = PID_MAX_LIMIT + TGID_OFFSET; | 2741 | filp->f_pos = PID_MAX_LIMIT + TGID_OFFSET; |
2749 | out: | 2742 | out: |
2750 | put_task_struct(reaper); | ||
2751 | out_no_task: | ||
2752 | return 0; | 2743 | return 0; |
2753 | } | 2744 | } |
2754 | 2745 | ||
diff --git a/fs/proc/root.c b/fs/proc/root.c index 5da984959edc..13ef6247e7a3 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c | |||
@@ -100,7 +100,6 @@ static struct dentry *proc_mount(struct file_system_type *fs_type, | |||
100 | int err; | 100 | int err; |
101 | struct super_block *sb; | 101 | struct super_block *sb; |
102 | struct pid_namespace *ns; | 102 | struct pid_namespace *ns; |
103 | struct proc_inode *ei; | ||
104 | char *options; | 103 | char *options; |
105 | 104 | ||
106 | if (flags & MS_KERNMOUNT) { | 105 | if (flags & MS_KERNMOUNT) { |
@@ -130,13 +129,6 @@ static struct dentry *proc_mount(struct file_system_type *fs_type, | |||
130 | sb->s_flags |= MS_ACTIVE; | 129 | sb->s_flags |= MS_ACTIVE; |
131 | } | 130 | } |
132 | 131 | ||
133 | ei = PROC_I(sb->s_root->d_inode); | ||
134 | if (!ei->pid) { | ||
135 | rcu_read_lock(); | ||
136 | ei->pid = get_pid(find_pid_ns(1, ns)); | ||
137 | rcu_read_unlock(); | ||
138 | } | ||
139 | |||
140 | return dget(sb->s_root); | 132 | return dget(sb->s_root); |
141 | } | 133 | } |
142 | 134 | ||