patch-2.4.0-test11 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.4.0-test10/linux/fs/proc/generic.c linux/fs/proc/generic.c
@@ -215,7 +215,7 @@
 
 static struct inode_operations proc_link_inode_operations = {
 	readlink:	proc_readlink,
-	follow_link:	proc_follow_link
+	follow_link:	proc_follow_link,
 };
 
 /*
@@ -396,8 +396,6 @@
 		if (dentry->d_op != &proc_dentry_operations)
 			continue;
 		inode = dentry->d_inode;
-		if (!inode)
-			continue;
 		if (inode->u.generic_ip != de)
 			continue;
 		fops_put(filp->f_op);
@@ -573,12 +571,12 @@
 				(void *) proc_alloc_map);
 		proc_kill_inodes(de);
 		de->nlink = 0;
-		de->deleted = 1;
-		if (!de->count)
+		if (!atomic_read(&de->count))
 			free_proc_entry(de);
 		else {
+			de->deleted = 1;
 			printk("remove_proc_entry: %s/%s busy, count=%d\n",
-				parent->name, de->name, de->count);
+				parent->name, de->name, atomic_read(&de->count));
 		}
 		break;
 	}

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