summaryrefslogtreecommitdiffstats
path: root/drivers/oprofile/event_buffer.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-04-13 03:50:03 +1000
committerPaul Mackerras <paulus@samba.org>2007-04-13 03:50:03 +1000
commite049d1ca3094f3d1d94617f456a9961202f96e3a (patch)
treea30397ad22f2fbea268bd28fa69c60aad9dfa62a /drivers/oprofile/event_buffer.c
parentedfac96a92b88d3b0b53e3f8231b74beee9ecd1d (diff)
parent80584ff3b99c36ead7e130e453b3a48b18072d18 (diff)
downloadop-kernel-dev-e049d1ca3094f3d1d94617f456a9961202f96e3a.zip
op-kernel-dev-e049d1ca3094f3d1d94617f456a9961202f96e3a.tar.gz
Merge branch 'linux-2.6' into for-2.6.22
Diffstat (limited to 'drivers/oprofile/event_buffer.c')
-rw-r--r--drivers/oprofile/event_buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c
index 00e937e..e7fbac5 100644
--- a/drivers/oprofile/event_buffer.c
+++ b/drivers/oprofile/event_buffer.c
@@ -70,11 +70,12 @@ void wake_up_buffer_waiter(void)
int alloc_event_buffer(void)
{
int err = -ENOMEM;
+ unsigned long flags;
- spin_lock(&oprofilefs_lock);
+ spin_lock_irqsave(&oprofilefs_lock, flags);
buffer_size = fs_buffer_size;
buffer_watershed = fs_buffer_watershed;
- spin_unlock(&oprofilefs_lock);
+ spin_unlock_irqrestore(&oprofilefs_lock, flags);
if (buffer_watershed >= buffer_size)
return -EINVAL;
OpenPOWER on IntegriCloud