Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6917500 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Corbet
Browse files

parisc-kernel-perf: BKL pushdown



Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 6044c319
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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>
@@ -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;
}