From 9a8bd2f76cb78fd730337f1b3b9cbef101ce2dad Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 20 May 2008 19:15:37 +0200 Subject: bf561-coreb: BKL pushdown Signed-off-by: Arnd Bergmann --- arch/blackfin/mach-bf561/coreb.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/blackfin') diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c index 1b44e9e..8526478 100644 --- a/arch/blackfin/mach-bf561/coreb.c +++ b/arch/blackfin/mach-bf561/coreb.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -196,6 +197,7 @@ static loff_t coreb_lseek(struct file *file, loff_t offset, int origin) static int coreb_open(struct inode *inode, struct file *file) { + lock_kernel(); spin_lock_irq(&coreb_lock); if (coreb_status & COREB_IS_OPEN) @@ -204,10 +206,12 @@ static int coreb_open(struct inode *inode, struct file *file) coreb_status |= COREB_IS_OPEN; spin_unlock_irq(&coreb_lock); + unlock_kernel(); return 0; out_busy: spin_unlock_irq(&coreb_lock); + unlock_kernel(); return -EBUSY; } -- cgit v1.1 From 57debddaa1d247ed147209b22b5d40bd97526c33 Mon Sep 17 00:00:00 2001 From: Jonathan Corbet Date: Mon, 30 Jun 2008 16:45:15 -0600 Subject: bf561-coreb: BKL unneeded for open() According to Mike Frysinger: http://permalink.gmane.org/gmane.linux.kernel/699279 open() does not need the BKL, so take it back out. --- arch/blackfin/mach-bf561/coreb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'arch/blackfin') diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c index 8526478..8598098 100644 --- a/arch/blackfin/mach-bf561/coreb.c +++ b/arch/blackfin/mach-bf561/coreb.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -195,9 +194,9 @@ static loff_t coreb_lseek(struct file *file, loff_t offset, int origin) return ret; } +/* No BKL needed here */ static int coreb_open(struct inode *inode, struct file *file) { - lock_kernel(); spin_lock_irq(&coreb_lock); if (coreb_status & COREB_IS_OPEN) @@ -206,12 +205,10 @@ static int coreb_open(struct inode *inode, struct file *file) coreb_status |= COREB_IS_OPEN; spin_unlock_irq(&coreb_lock); - unlock_kernel(); return 0; out_busy: spin_unlock_irq(&coreb_lock); - unlock_kernel(); return -EBUSY; } -- cgit v1.1