1
0
Fork 0

flash: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
hifive-unleashed-5.1
Arnd Bergmann 2008-05-20 19:15:54 +02:00 committed by Jonathan Corbet
parent 1d17bf0c08
commit 78abb6ac91
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}