summaryrefslogtreecommitdiffstats
path: root/fs/devices.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-09 23:29:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-09 23:29:35 +0000
commit35385d7a83b4cae6d5ea5f80f3b3377d94178344 (patch)
tree49494d95dfef31ba4f9a697d31e4028cf65a57bd /fs/devices.c
parentd9d8062e7b49943b2a2fb034f817a9fc217fd40f (diff)
Merge with 2.4.0-test3-pre7.
Diffstat (limited to 'fs/devices.c')
-rw-r--r--fs/devices.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/devices.c b/fs/devices.c
index 9e37e5c68..3023747da 100644
--- a/fs/devices.c
+++ b/fs/devices.c
@@ -18,6 +18,7 @@
#include <linux/fcntl.h>
#include <linux/errno.h>
#include <linux/module.h>
+#include <linux/smp_lock.h>
#ifdef CONFIG_KMOD
#include <linux/kmod.h>
@@ -143,6 +144,7 @@ int chrdev_open(struct inode * inode, struct file * filp)
{
int ret = -ENODEV;
+ lock_kernel();
filp->f_op = fops_get(get_chrfops(MAJOR(inode->i_rdev),
MINOR(inode->i_rdev)));
if (filp->f_op) {
@@ -150,6 +152,7 @@ int chrdev_open(struct inode * inode, struct file * filp)
if (filp->f_op->open != NULL)
ret = filp->f_op->open(inode,filp);
}
+ unlock_kernel();
return ret;
}