summaryrefslogtreecommitdiffstats
path: root/fs/proc/root.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-18 17:17:51 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-18 17:17:51 +0000
commitf1382dc4850bb459d24a81c6cb0ef93ea7bd4a79 (patch)
tree225271a3d5dcd4e9dea5ee393556abd754c964b1 /fs/proc/root.c
parent135b00fc2e90e605ac2a96b20b0ebd93851a3f89 (diff)
o Merge with Linux 2.1.90.
o Divide L1 cache sizes by 1024 before printing, makes the numbers a bit more credible ...
Diffstat (limited to 'fs/proc/root.c')
-rw-r--r--fs/proc/root.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 3e344bd09..ad3a541cb 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -14,8 +14,8 @@
#include <linux/stat.h>
#include <linux/config.h>
#include <asm/bitops.h>
-#ifdef CONFIG_KERNELD
-#include <linux/kerneld.h>
+#ifdef CONFIG_KMOD
+#include <linux/kmod.h>
#endif
/*
@@ -234,7 +234,7 @@ proc_openprom_deregister(void)
}
#endif
-#if defined(CONFIG_SUN_OPENPROMFS_MODULE) && defined(CONFIG_KERNELD)
+#if defined(CONFIG_SUN_OPENPROMFS_MODULE) && defined(CONFIG_KMOD)
static int
proc_openprom_defreaddir(struct inode * inode, struct file * filp,
void * dirent, filldir_t filldir)
@@ -812,14 +812,18 @@ static int proc_root_lookup(struct inode * dir, struct dentry * dentry)
break;
}
}
+ read_lock(&tasklist_lock);
p = find_task_by_pid(pid);
inode = NULL;
if (pid && p) {
unsigned long ino = (pid << 16) + PROC_PID_INO;
inode = proc_get_inode(dir->i_sb, ino, &proc_pid);
- if (!inode)
+ if (!inode) {
+ read_unlock(&tasklist_lock);
return -EINVAL;
+ }
}
+ read_unlock(&tasklist_lock);
dentry->d_op = &proc_dentry_operations;
d_add(dentry, inode);