From 2b2f5565b8c555032feb151c15a8196ee52a07d4 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 20 May 2008 19:15:54 +0200 Subject: [PATCH] --- yaml --- r: 100346 b: refs/heads/master c: 78abb6ac919cee123e632d833a42d0312ccb2b0d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/sbus/char/flash.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 267262ddbadd..f88e56a5a5a3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1d17bf0c08569e7aefd27df0179065fb955588c4 +refs/heads/master: 78abb6ac919cee123e632d833a42d0312ccb2b0d diff --git a/trunk/drivers/sbus/char/flash.c b/trunk/drivers/sbus/char/flash.c index 44e039865aa9..7d95e151513a 100644 --- a/trunk/drivers/sbus/char/flash.c +++ b/trunk/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; }