From ed38a74377f8838f31aa7ee6a5fad43e2aff2f66 Mon Sep 17 00:00:00 2001 From: Li Zefan Date: Fri, 20 Mar 2009 09:48:03 +0800 Subject: [PATCH] --- yaml --- r: 141047 b: refs/heads/master c: 5006ea73f38caef6065d1136808413813271633f h: refs/heads/master i: 141045: 943dbf983337ab907419aa6e0acbaed8c0594019 141043: 0da49c31c87bd7d67437d815bb87c58d4b0fce52 141039: 15d5f6ff368f3c0e991d76ec114a1f5e46b3e7a0 v: v3 --- [refs] | 2 +- trunk/kernel/trace/blktrace.c | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index e74316c1f1b8..e64b434f6806 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1a17662ea033674a58bad3603531b0b5d42572f6 +refs/heads/master: 5006ea73f38caef6065d1136808413813271633f diff --git a/trunk/kernel/trace/blktrace.c b/trunk/kernel/trace/blktrace.c index fb3bc53835dd..73845b7968bb 100644 --- a/trunk/kernel/trace/blktrace.c +++ b/trunk/kernel/trace/blktrace.c @@ -30,7 +30,7 @@ static unsigned int blktrace_seq __read_mostly = 1; static struct trace_array *blk_tr; -static int __read_mostly blk_tracer_enabled; +static bool blk_tracer_enabled __read_mostly; /* Select an alternative, minimalistic output than the original one */ #define TRACE_BLK_OPT_CLASSIC 0x1 @@ -1111,9 +1111,7 @@ static int blk_tracer_init(struct trace_array *tr) { blk_tr = tr; blk_tracer_start(tr); - mutex_lock(&blk_probe_mutex); - blk_tracer_enabled++; - mutex_unlock(&blk_probe_mutex); + blk_tracer_enabled = true; return 0; } @@ -1131,11 +1129,7 @@ static void blk_tracer_reset(struct trace_array *tr) if (!atomic_read(&blk_probes_ref)) return; - mutex_lock(&blk_probe_mutex); - blk_tracer_enabled--; - WARN_ON(blk_tracer_enabled < 0); - mutex_unlock(&blk_probe_mutex); - + blk_tracer_enabled = false; blk_tracer_stop(tr); }