提交 78abb6ac 编写于 作者: A Arnd Bergmann 提交者: Jonathan Corbet

flash: BKL pushdown

Signed-off-by: NArnd Bergmann <arnd@arndb.de>
上级 1d17bf0c
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册