Re: [PATCH 06/19] kernel: convert perf_event_context.refcount from atomic_t to refcount_t

From
Peter Zijlstra <hidden>
Date
2017-02-20 10:28:25
Also in
linux-fsdevel, lkml
Reply to
Elena Reshetova, 2017-02-20
On Mon, Feb 20, 2017 at 12:18:55PM +0200, Elena Reshetova wrote:
quoted hunk ↗ jump to hunk
+++ b/kernel/events/core.c
@@ -1108,7 +1108,7 @@ static void perf_event_ctx_deactivate(struct perf_event_context *ctx)
 
 static void get_ctx(struct perf_event_context *ctx)
 {
-	WARN_ON(!atomic_inc_not_zero(&ctx->refcount));
+	WARN_ON(!refcount_inc_not_zero(&ctx->refcount));
 }
You can change that to refcount_inc(), as that has the exact same
semantics.
Thread (36 messages) 36 messages, 6 authors, last reply 2017-04-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help