Skip to content

Commit

Permalink
parisc-kernel-perf: BKL pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
arndb authored and Jonathan Corbet committed Jul 2, 2008
1 parent 6044c31 commit b691750
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/parisc/kernel/perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/miscdevice.h>
#include <linux/smp_lock.h>
#include <linux/spinlock.h>

#include <asm/uaccess.h>
Expand Down Expand Up @@ -260,13 +261,16 @@ printk("Preparing to start counters\n");
*/
static int perf_open(struct inode *inode, struct file *file)
{
lock_kernel();
spin_lock(&perf_lock);
if (perf_enabled) {
spin_unlock(&perf_lock);
unlock_kernel();
return -EBUSY;
}
perf_enabled = 1;
spin_unlock(&perf_lock);
unlock_kernel();

return 0;
}
Expand Down

0 comments on commit b691750

Please sign in to comment.