From: Arnd Bergmann Date: Tue, 20 May 2008 17:16:50 +0000 (+0200) Subject: sparc64-rtc: BKL pushdown X-Git-Tag: firefly_0821_release~19698^2~25 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=09de36137c3794786bc75682c0e1ce45182c1772;p=firefly-linux-kernel-4.4.55.git sparc64-rtc: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index e5d238970c7e..bedc4c159b1c 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -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; }