|
@@ -2714,19 +2714,12 @@ static int fake_filldir(void *buf, const char *name, int namelen,
|
|
|
/* for the /proc/ directory itself, after non-process stuff has been done */
|
|
|
int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir)
|
|
|
{
|
|
|
- unsigned int nr;
|
|
|
- struct task_struct *reaper;
|
|
|
struct tgid_iter iter;
|
|
|
struct pid_namespace *ns;
|
|
|
filldir_t __filldir;
|
|
|
|
|
|
if (filp->f_pos >= PID_MAX_LIMIT + TGID_OFFSET)
|
|
|
- goto out_no_task;
|
|
|
- nr = filp->f_pos - FIRST_PROCESS_ENTRY;
|
|
|
-
|
|
|
- reaper = get_proc_task(filp->f_path.dentry->d_inode);
|
|
|
- if (!reaper)
|
|
|
- goto out_no_task;
|
|
|
+ goto out;
|
|
|
|
|
|
ns = filp->f_dentry->d_sb->s_fs_info;
|
|
|
iter.task = NULL;
|
|
@@ -2747,8 +2740,6 @@ int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir)
|
|
|
}
|
|
|
filp->f_pos = PID_MAX_LIMIT + TGID_OFFSET;
|
|
|
out:
|
|
|
- put_task_struct(reaper);
|
|
|
-out_no_task:
|
|
|
return 0;
|
|
|
}
|
|
|
|