Skip to content

Commit

Permalink
sparc64-rtc: 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 Jul 2, 2008
1 parent ee30d64 commit 09de361
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/sparc64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/string.h>
Expand Down Expand Up @@ -1659,10 +1660,14 @@ static int mini_rtc_ioctl(struct inode *inode, struct file *file,

static int mini_rtc_open(struct inode *inode, struct file *file)
{
if (mini_rtc_status & RTC_IS_OPEN)
lock_kernel();
if (mini_rtc_status & RTC_IS_OPEN) {
unlock_kernel();
return -EBUSY;
}

mini_rtc_status |= RTC_IS_OPEN;
unlock_kernel();

return 0;
}
Expand Down

0 comments on commit 09de361

Please sign in to comment.