mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 06:31:52 +00:00
flash: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
1d17bf0c08
commit
78abb6ac91
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user