From 78abb6ac919cee123e632d833a42d0312ccb2b0d Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 20 May 2008 19:15:54 +0200 Subject: [PATCH] flash: BKL pushdown Signed-off-by: Arnd Bergmann --- drivers/sbus/char/flash.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 44e039865aa..7d95e151513 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c @@ -127,9 +127,13 @@ flash_read(struct file * file, char __user * buf, 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; } -- 2.41.1