lkml.org 
[lkml]   [2017]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/19] kernel: convert perf_event_context.refcount from atomic_t to refcount_t
On Mon, Feb 20, 2017 at 12:18:55PM +0200, Elena Reshetova wrote:
> +++ 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.

\
 
 \ /
  Last update: 2017-02-20 11:31    [W:0.207 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site