Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346305
b: refs/heads/master
c: ae06c7c
h: refs/heads/master
i:
  346303: b5eb86d
v: v3
  • Loading branch information
Eric W. Biederman committed Nov 19, 2012
1 parent 4ca022d commit 5f0e4d6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e656d8a6f7fdf7612d2f5771f0ddfca9487f59d9
refs/heads/master: ae06c7c83fc6e97ba247a261921c101960f3d28f
11 changes: 1 addition & 10 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down
8 changes: 0 additions & 8 deletions trunk/fs/proc/root.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
int err;
struct super_block *sb;
struct pid_namespace *ns;
struct proc_inode *ei;
char *options;

if (flags & MS_KERNMOUNT) {
Expand Down Expand Up @@ -130,13 +129,6 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
sb->s_flags |= MS_ACTIVE;
}

ei = PROC_I(sb->s_root->d_inode);
if (!ei->pid) {
rcu_read_lock();
ei->pid = get_pid(find_pid_ns(1, ns));
rcu_read_unlock();
}

return dget(sb->s_root);
}

Expand Down

0 comments on commit 5f0e4d6

Please sign in to comment.