diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-05-16 16:17:33 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 16:05:52 -0400 |
commit | 3462032d66703ef7721329b44fe2dac4aaef475d (patch) | |
tree | 5c043d69053609adb41ed9a4a1ec0498170fc852 /drivers/isdn/hardware | |
parent | a237f3bbaab28bb780201f15f6003cf3d2e81024 (diff) |
divamnt: BKL pushdown
Put explicit lock_kernel() calls into maint_open().
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/isdn/hardware')
-rw-r--r-- | drivers/isdn/hardware/eicon/divamnt.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c index c90928974249..1e85f743214e 100644 --- a/drivers/isdn/hardware/eicon/divamnt.c +++ b/drivers/isdn/hardware/eicon/divamnt.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/poll.h> | 16 | #include <linux/poll.h> |
17 | #include <linux/smp_lock.h> | ||
17 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
18 | 19 | ||
19 | #include "platform.h" | 20 | #include "platform.h" |
@@ -127,14 +128,19 @@ static unsigned int maint_poll(struct file *file, poll_table * wait) | |||
127 | 128 | ||
128 | static int maint_open(struct inode *ino, struct file *filep) | 129 | static int maint_open(struct inode *ino, struct file *filep) |
129 | { | 130 | { |
131 | int ret; | ||
132 | |||
133 | lock_kernel(); | ||
130 | /* only one open is allowed, so we test | 134 | /* only one open is allowed, so we test |
131 | it atomically */ | 135 | it atomically */ |
132 | if (test_and_set_bit(0, &opened)) | 136 | if (test_and_set_bit(0, &opened)) |
133 | return (-EBUSY); | 137 | ret = -EBUSY; |
134 | 138 | else { | |
135 | filep->private_data = NULL; | 139 | filep->private_data = NULL; |
136 | 140 | ret = nonseekable_open(ino, filep); | |
137 | return nonseekable_open(ino, filep); | 141 | } |
142 | unlock_kernel(); | ||
143 | return ret; | ||
138 | } | 144 | } |
139 | 145 | ||
140 | static int maint_close(struct inode *ino, struct file *filep) | 146 | static int maint_close(struct inode *ino, struct file *filep) |