summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
commit482368b1a8e45430672c58c9a42e7d2004367126 (patch)
treece2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /fs/proc
parente4d0251c6f56ab2e191afb70f80f382793e23f74 (diff)
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/inode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 607a7d7e9..ffe846e5c 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -15,6 +15,7 @@
#include <linux/limits.h>
#define __NO_VERSION__
#include <linux/module.h>
+#include <linux/smp_lock.h>
#include <asm/system.h>
#include <asm/uaccess.h>
@@ -34,6 +35,7 @@ struct proc_dir_entry * de_get(struct proc_dir_entry *de)
void de_put(struct proc_dir_entry *de)
{
if (de) {
+ lock_kernel(); /* FIXME: count should be atomic_t */
if (!de->count) {
printk("de_put: entry %s already free!\n", de->name);
return;
@@ -46,6 +48,7 @@ void de_put(struct proc_dir_entry *de)
free_proc_entry(de);
}
}
+ unlock_kernel();
}
}
@@ -66,6 +69,8 @@ static void proc_delete_inode(struct inode *inode)
{
struct proc_dir_entry *de = inode->u.generic_ip;
+ inode->i_state = I_CLEAR;
+
if (PROC_INODE_PROPER(inode)) {
proc_pid_delete_inode(inode);
return;