From: Arnd Bergmann Date: Tue, 20 May 2008 17:15:54 +0000 (+0200) Subject: flash: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~63 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=78abb6ac919cee123e632d833a42d0312ccb2b0d;p=linux-2.6-omap-h63xx.git flash: BKL pushdown Signed-off-by: Arnd Bergmann --- 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; }