From: Jérémie Galarneau Date: Mon, 24 Aug 2015 16:17:46 +0000 (-0400) Subject: Remove unneeded RCU read lock X-Git-Tag: v2.8.0-rc1~469 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=22c34f481f5a4491981e86a57f884852fc324a21;p=lttng-tools.git Remove unneeded RCU read lock lttng_ht_get_count() now takes the RCU read lock automatically. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c index 0a43eefa6..851b9ac5b 100644 --- a/src/bin/lttng-sessiond/save.c +++ b/src/bin/lttng-sessiond/save.c @@ -1386,11 +1386,7 @@ int save_domains(struct config_writer *writer, struct ltt_session *session) goto end; } - rcu_read_lock(); - agent_count = - lttng_ht_get_count(session->ust_session->agents); - rcu_read_unlock(); - + agent_count = lttng_ht_get_count(session->ust_session->agents); if (agent_count > 0) { ret = config_writer_open_element(writer, config_element_domain);