patch-2.3.99-pre7 linux/fs/proc/generic.c

Next file: linux/fs/proc/inode.c
Previous file: linux/fs/proc/base.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/fs/proc/generic.c linux/fs/proc/generic.c
@@ -373,36 +373,30 @@
 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;
+	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();
+		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,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)