diff options
Diffstat (limited to 'fs/proc/generic.c')
-rw-r--r-- | fs/proc/generic.c | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 4d6662780..31e43fab9 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -373,36 +373,30 @@ int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp) static void proc_kill_inodes(struct proc_dir_entry *de) { struct list_head *p; - struct super_block *sb; + struct super_block *sb = proc_mnt->mnt_sb; /* - * Actually it's a partial revoke(). We have to go through all - * copies of procfs. proc_super_blocks is protected by the big - * lock for the time being. + * Actually it's a partial revoke(). */ - for (sb = proc_super_blocks; - sb; - sb = (struct super_block*)sb->u.generic_sbp) { - file_list_lock(); - for (p = sb->s_files.next; p != &sb->s_files; p = p->next) { - struct file * filp = list_entry(p, struct file, f_list); - struct dentry * dentry; - struct inode * inode; - - dentry = filp->f_dentry; - if (!dentry) - continue; - if (dentry->d_op != &proc_dentry_operations) - continue; - inode = dentry->d_inode; - if (!inode) - continue; - if (inode->u.generic_ip != de) - continue; - filp->f_op = NULL; - } - file_list_unlock(); + file_list_lock(); + for (p = sb->s_files.next; p != &sb->s_files; p = p->next) { + struct file * filp = list_entry(p, struct file, f_list); + struct dentry * dentry; + struct inode * inode; + + dentry = filp->f_dentry; + if (!dentry) + continue; + if (dentry->d_op != &proc_dentry_operations) + continue; + inode = dentry->d_inode; + if (!inode) + continue; + if (inode->u.generic_ip != de) + continue; + filp->f_op = NULL; } + file_list_unlock(); } struct proc_dir_entry *proc_symlink(const char *name, |