lkml.org 
[lkml]   [2010]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 2/4] procfs: kill the global proc_mnt variable
    After the previous cleanup in proc_get_sb() the global proc_mnt has
    no reasons to exists, kill it.

    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
    ---

    fs/proc/internal.h | 1 -
    fs/proc/inode.c | 2 --
    fs/proc/root.c | 5 +++--
    3 files changed, 3 insertions(+), 5 deletions(-)

    --- 35-rc3/fs/proc/internal.h~PNS_2_KILL_ROOT_MNT 2010-06-19 19:20:23.000000000 +0200
    +++ 35-rc3/fs/proc/internal.h 2010-06-19 19:21:39.000000000 +0200
    @@ -106,7 +106,6 @@ static inline 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 *, unsigned int, struct proc_dir_entry *);

    --- 35-rc3/fs/proc/inode.c~PNS_2_KILL_ROOT_MNT 2010-06-19 19:20:23.000000000 +0200
    +++ 35-rc3/fs/proc/inode.c 2010-06-19 19:21:39.000000000 +0200
    @@ -43,8 +43,6 @@ static void proc_delete_inode(struct ino
    clear_inode(inode);
    }

    -struct vfsmount *proc_mnt;
    -
    static struct kmem_cache * proc_inode_cachep;

    static struct inode *proc_alloc_inode(struct super_block *sb)
    --- 35-rc3/fs/proc/root.c~PNS_2_KILL_ROOT_MNT 2010-06-19 19:21:38.000000000 +0200
    +++ 35-rc3/fs/proc/root.c 2010-06-19 19:21:39.000000000 +0200
    @@ -94,14 +94,15 @@ static struct file_system_type proc_fs_t

    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;
    }


    \
     
     \ /
      Last update: 2010-06-19 21:15    [W:0.022 / U:92.412 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site