Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118604
b: refs/heads/master
c: cae042a
h: refs/heads/master
v: v3
  • Loading branch information
Nick Piggin authored and Robert Richter committed Oct 27, 2008
1 parent ce8eb6c commit 5d04764
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa448d6008cc81a3537e5db168fa0490e0caba68
refs/heads/master: cae042a73bb22fc4132b04ff94bd684456203089
6 changes: 3 additions & 3 deletions trunk/drivers/oprofile/event_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static int event_buffer_open(struct inode *inode, struct file *file)
if (!capable(CAP_SYS_ADMIN))
return -EPERM;

if (test_and_set_bit(0, &buffer_opened))
if (test_and_set_bit_lock(0, &buffer_opened))
return -EBUSY;

/* Register as a user of dcookies
Expand All @@ -129,7 +129,7 @@ static int event_buffer_open(struct inode *inode, struct file *file)
fail:
dcookie_unregister(file->private_data);
out:
clear_bit(0, &buffer_opened);
__clear_bit_unlock(0, &buffer_opened);
return err;
}

Expand All @@ -141,7 +141,7 @@ static int event_buffer_release(struct inode *inode, struct file *file)
dcookie_unregister(file->private_data);
buffer_pos = 0;
atomic_set(&buffer_ready, 0);
clear_bit(0, &buffer_opened);
__clear_bit_unlock(0, &buffer_opened);
return 0;
}

Expand Down

0 comments on commit 5d04764

Please sign in to comment.