Skip to content

Commit

Permalink
procfs: kill the global proc_mnt variable
Browse files Browse the repository at this point in the history
After the previous cleanup in proc_get_sb() the global proc_mnt has no
reasons to exists, kill it.

Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Eric W. Biederman <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Acked-by: Serge E. Hallyn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
oleg-nesterov authored and torvalds committed Mar 24, 2011
1 parent 4308eeb commit 52e9fc7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions fs/proc/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ static void proc_evict_inode(struct inode *inode)
}
}

struct vfsmount *proc_mnt;

static struct kmem_cache * proc_inode_cachep;

static struct inode *proc_alloc_inode(struct super_block *sb)
Expand Down
1 change: 0 additions & 1 deletion fs/proc/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ static inline struct proc_dir_entry *pde_get(struct proc_dir_entry *pde)
}
void pde_put(struct proc_dir_entry *pde);

extern struct vfsmount *proc_mnt;
int proc_fill_super(struct super_block *);
struct inode *proc_get_inode(struct super_block *, struct proc_dir_entry *);

Expand Down
7 changes: 4 additions & 3 deletions fs/proc/root.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,20 @@ static struct file_system_type proc_fs_type = {

void __init proc_root_init(void)
{
struct vfsmount *mnt;
int err;

proc_init_inodecache();
err = register_filesystem(&proc_fs_type);
if (err)
return;
proc_mnt = kern_mount_data(&proc_fs_type, &init_pid_ns);
if (IS_ERR(proc_mnt)) {
mnt = kern_mount_data(&proc_fs_type, &init_pid_ns);
if (IS_ERR(mnt)) {
unregister_filesystem(&proc_fs_type);
return;
}

init_pid_ns.proc_mnt = proc_mnt;
init_pid_ns.proc_mnt = mnt;
proc_symlink("mounts", NULL, "self/mounts");

proc_net_init();
Expand Down

0 comments on commit 52e9fc7

Please sign in to comment.