diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-07 13:22:10 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-07 13:22:10 -0500 |
commit | 01aab518b084a547940ed6ff334e9a7721c7dc71 (patch) | |
tree | 627f0c7e4833b1c563aba403a1f731fc7c4f3b0c /drivers | |
parent | fed4d59b6ec5481caceb17863f19a0b0e5eaa939 (diff) | |
parent | 7c64ade53a6f977d73f16243865c42ceae999aea (diff) |
Merge branch 'oprofile-for-tip' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into x86/urgent
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/oprofile/event_buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c index d962ba0dd87a..191a3202cecc 100644 --- a/drivers/oprofile/event_buffer.c +++ b/drivers/oprofile/event_buffer.c | |||
@@ -105,7 +105,7 @@ static int event_buffer_open(struct inode *inode, struct file *file) | |||
105 | if (!capable(CAP_SYS_ADMIN)) | 105 | if (!capable(CAP_SYS_ADMIN)) |
106 | return -EPERM; | 106 | return -EPERM; |
107 | 107 | ||
108 | if (test_and_set_bit(0, &buffer_opened)) | 108 | if (test_and_set_bit_lock(0, &buffer_opened)) |
109 | return -EBUSY; | 109 | return -EBUSY; |
110 | 110 | ||
111 | /* Register as a user of dcookies | 111 | /* Register as a user of dcookies |
@@ -129,7 +129,7 @@ static int event_buffer_open(struct inode *inode, struct file *file) | |||
129 | fail: | 129 | fail: |
130 | dcookie_unregister(file->private_data); | 130 | dcookie_unregister(file->private_data); |
131 | out: | 131 | out: |
132 | clear_bit(0, &buffer_opened); | 132 | __clear_bit_unlock(0, &buffer_opened); |
133 | return err; | 133 | return err; |
134 | } | 134 | } |
135 | 135 | ||
@@ -141,7 +141,7 @@ static int event_buffer_release(struct inode *inode, struct file *file) | |||
141 | dcookie_unregister(file->private_data); | 141 | dcookie_unregister(file->private_data); |
142 | buffer_pos = 0; | 142 | buffer_pos = 0; |
143 | atomic_set(&buffer_ready, 0); | 143 | atomic_set(&buffer_ready, 0); |
144 | clear_bit(0, &buffer_opened); | 144 | __clear_bit_unlock(0, &buffer_opened); |
145 | return 0; | 145 | return 0; |
146 | } | 146 | } |
147 | 147 | ||