diff options
Diffstat (limited to 'fs/proc/generic.c')
-rw-r--r-- | fs/proc/generic.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index f766be29d2c7..01e07f2a188f 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -425,13 +425,10 @@ struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *dir, if (de->namelen != dentry->d_name.len) continue; if (!memcmp(dentry->d_name.name, de->name, de->namelen)) { - unsigned int ino; - - ino = de->low_ino; pde_get(de); spin_unlock(&proc_subdir_lock); error = -EINVAL; - inode = proc_get_inode(dir->i_sb, ino, de); + inode = proc_get_inode(dir->i_sb, de); goto out_unlock; } } @@ -768,12 +765,7 @@ EXPORT_SYMBOL(proc_create_data); static void free_proc_entry(struct proc_dir_entry *de) { - unsigned int ino = de->low_ino; - - if (ino < PROC_DYNAMIC_FIRST) - return; - - release_inode_number(ino); + release_inode_number(de->low_ino); if (S_ISLNK(de->mode)) kfree(de->data); @@ -834,12 +826,9 @@ void remove_proc_entry(const char *name, struct proc_dir_entry *parent) wait_for_completion(de->pde_unload_completion); - goto continue_removing; + spin_lock(&de->pde_unload_lock); } - spin_unlock(&de->pde_unload_lock); -continue_removing: - spin_lock(&de->pde_unload_lock); while (!list_empty(&de->pde_openers)) { struct pde_opener *pdeo; |