Skip to content

Commit

Permalink
flash: BKL pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jun 20, 2008
1 parent 1d17bf0 commit 78abb6a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/sbus/char/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 78abb6a

Please sign in to comment.