flash: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 44e0398..7d95e15 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -127,9 +127,13 @@
static int
flash_open(struct inode *inode, struct file *file)
{
- if (test_and_set_bit(0, (void *)&flash.busy) != 0)
+ lock_kernel();
+ if (test_and_set_bit(0, (void *)&flash.busy) != 0) {
+ unlock_kernel();
return -EBUSY;
+ }
+ unlock_kernel();
return 0;
}