diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 17:16:50 (GMT) |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-02 21:06:25 (GMT) |
commit | 09de36137c3794786bc75682c0e1ce45182c1772 (patch) | |
tree | 1f3798f1405dd35b55e998e8174ef58c88783121 /arch/sparc64/kernel/time.c | |
parent | ee30d64e42ee1384a81d241b3962d3c1e6174992 (diff) | |
download | linux-fsl-qoriq-09de36137c3794786bc75682c0e1ce45182c1772.tar.xz |
sparc64-rtc: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/sparc64/kernel/time.c')
-rw-r--r-- | arch/sparc64/kernel/time.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index e5d2389..bedc4c1 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c @@ -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> @@ -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; } |