projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d17bf0
)
flash: BKL pushdown
author
Arnd Bergmann
<arnd@arndb.de>
Tue, 20 May 2008 17:15:54 +0000
(19:15 +0200)
committer
Jonathan Corbet
<corbet@lwn.net>
Fri, 20 Jun 2008 20:05:57 +0000
(14:05 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/sbus/char/flash.c
patch
|
blob
|
history
diff --git
a/drivers/sbus/char/flash.c
b/drivers/sbus/char/flash.c
index 44e039865aa99714d4184e033a2d5bce65d94532..7d95e151513a0a5446e07ef6da24d9605334af53 100644
(file)
--- 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;
}