From patchwork Wed Jun 14 22:27:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 105606 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp512736qgd; Wed, 14 Jun 2017 15:29:54 -0700 (PDT) X-Received: by 10.99.176.77 with SMTP id z13mr2172494pgo.78.1497479394136; Wed, 14 Jun 2017 15:29:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497479394; cv=none; d=google.com; s=arc-20160816; b=K1zyLN34pfQ0fzg5VcLG34xNyeJjx+HAyz0IBerKki084NfYB+/HxkeyZ4Dbkejr5B W+UbR3lduxvOgt47RMHtUKiD2HCZZCFTS9P6jJg0+XtBrD1cMcmK7EJ6HOXDR/uEJ3C9 igrFhBA3a3YIeFcMueLjSoRFxy/dQp8+m1c0W6nqJqPZj0/MUxs9VS3Hx5eJe8Q8Xmhk GRwhaQ041oisVGsDDowKXCOIS0gmVJT7mqdDg4gxIIqh1ujaUHUniP9za1DkW7RkoszH kYy9M7ThlH5eGpYfR0S+xoRkkbyFDWnM66ix7nJxYW/q69kRkHzt5CAXhoolmRNB5ybW Kfag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=gj3sMUgHXQHtCSz9C1qoE3Xi/5GAJlgctnyNztbGxzk=; b=s8GCD2UuqDvwp8pfks3PtN0AVeTP4ovDIxtXlWfgl3ZIQQZnDSF8PNIN6FaeMsC1fz +KU3/C6DC718Q2M3e87YEbHKVIChWcX5d+jCIZ7pTPskVV8poG+Ois7CJaDZq20vef8+ DBXtNVPdGHwMtZu13XRdYkBjE0ighs/kvK53dGyOMA9CU9yt8L11eezqQDJg+x1T/9zg Du4bifNloRI0rItXg0zM+1Mt9lq+UbarQwsvAUL/QJFqcJ75V1l0lqVYxTZpCZR/ERvZ EsztL3hZTYvVq0QkSMO6nLwI8DctNZfAkp+PQ5PsaP2UCi9sdHc/wnF0nynKmI/0woaD CZsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5si896224plj.98.2017.06.14.15.29.53; Wed, 14 Jun 2017 15:29:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753006AbdFNW3d (ORCPT + 25 others); Wed, 14 Jun 2017 18:29:33 -0400 Received: from foss.arm.com ([217.140.101.70]:39650 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbdFNW1e (ORCPT ); Wed, 14 Jun 2017 18:27:34 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B88D71688; Wed, 14 Jun 2017 15:27:33 -0700 (PDT) Received: from beelzebub.ast.arm.com (beelzebub.austin.arm.com [10.118.12.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3059A3F3E1; Wed, 14 Jun 2017 15:27:33 -0700 (PDT) From: Jeremy Linton To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, rostedt@goodmis.org, mingo@redhat.com, rusty@rustcorp.com.au, jeyu@redhat.com, kirill.shutemov@linux.intel.com, christoffer.dall@linaro.org, marc.zyngier@arm.com, jcm@jonmasters.org, clemens@ladisch.de, perex@perex.cz Subject: [PATCH v2 05/13] trace: rename trace_enum_mutex to trace_eval_mutex Date: Wed, 14 Jun 2017 17:27:21 -0500 Message-Id: <20170614222729.16521-6-jeremy.linton@arm.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170614222729.16521-1-jeremy.linton@arm.com> References: <20170614222729.16521-1-jeremy.linton@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is a lock protecting the trace_enum_map, rename it to reflect the use by more than enums. Signed-off-by: Jeremy Linton --- kernel/trace/trace.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.9.4 diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index af6ec07..e1bc56c 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -138,7 +138,7 @@ struct trace_eval_map_tail { const char *end; /* points to NULL */ }; -static DEFINE_MUTEX(trace_enum_mutex); +static DEFINE_MUTEX(trace_eval_mutex); /* * The trace_eval_maps are saved in an array with two extra elements, @@ -4758,7 +4758,7 @@ static void *enum_map_start(struct seq_file *m, loff_t *pos) union trace_eval_map_item *v; loff_t l = 0; - mutex_lock(&trace_enum_mutex); + mutex_lock(&trace_eval_mutex); v = trace_eval_maps; if (v) @@ -4773,7 +4773,7 @@ static void *enum_map_start(struct seq_file *m, loff_t *pos) static void enum_map_stop(struct seq_file *m, void *v) { - mutex_unlock(&trace_enum_mutex); + mutex_unlock(&trace_eval_mutex); } static int enum_map_show(struct seq_file *m, void *v) @@ -4838,7 +4838,7 @@ trace_insert_enum_map_file(struct module *mod, struct trace_eval_map **start, return; } - mutex_lock(&trace_enum_mutex); + mutex_lock(&trace_eval_mutex); if (!trace_eval_maps) trace_eval_maps = map_array; @@ -4863,7 +4863,7 @@ trace_insert_enum_map_file(struct module *mod, struct trace_eval_map **start, } memset(map_array, 0, sizeof(*map_array)); - mutex_unlock(&trace_enum_mutex); + mutex_unlock(&trace_eval_mutex); } static void trace_create_enum_file(struct dentry *d_tracer) @@ -7740,7 +7740,7 @@ static void trace_module_remove_enums(struct module *mod) if (!mod->num_trace_evals) return; - mutex_lock(&trace_enum_mutex); + mutex_lock(&trace_eval_mutex); map = trace_eval_maps; @@ -7757,7 +7757,7 @@ static void trace_module_remove_enums(struct module *mod) *last = trace_enum_jmp_to_tail(map)->tail.next; kfree(map); out: - mutex_unlock(&trace_enum_mutex); + mutex_unlock(&trace_eval_mutex); } #else static inline void trace_module_remove_enums(struct module *mod) { }