X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng-sessiond%2Fchannel.c;h=b4dc48d161e662f12678e5d8de900e5a7c2761b0;hp=5a22d2937f22a9d95de60f6a7126ff28671402b7;hb=e7b994a365c48d2dbe576b64811ec861da7c6375;hpb=7885e399f12affe1933fcacce7f2dab311ed6761 diff --git a/lttng-sessiond/channel.c b/lttng-sessiond/channel.c index 5a22d2937..b4dc48d16 100644 --- a/lttng-sessiond/channel.c +++ b/lttng-sessiond/channel.c @@ -20,11 +20,11 @@ #include #include +#include #include #include #include "channel.h" -#include "hashtable.h" #include "kernel.h" #include "ust-ctl.h" #include "utils.h" @@ -216,7 +216,7 @@ int channel_ust_create(struct ltt_ust_session *usess, int domain, struct lttng_channel *attr) { int ret = LTTCOMM_OK; - struct cds_lfht *chan_ht; + struct lttng_ht *chan_ht; struct ltt_ust_channel *uchan = NULL; struct lttng_channel *defattr = NULL; @@ -259,13 +259,17 @@ int channel_ust_create(struct ltt_ust_session *usess, int domain, } uchan->enabled = 1; - hashtable_add_unique(chan_ht, &uchan->node); + lttng_ht_add_unique_str(chan_ht, &uchan->node); DBG2("Channel %s created successfully", uchan->name); free(defattr); return LTTCOMM_OK; error_free_chan: + /* + * No need to remove the channel from the hash table because at this point + * it was not added hence the direct call and no call_rcu(). + */ trace_ust_destroy_channel(uchan); error: free(defattr); @@ -279,7 +283,6 @@ int channel_ust_disable(struct ltt_ust_session *usess, int domain, struct ltt_ust_channel *uchan) { int ret = LTTCOMM_OK; - struct cds_lfht *chan_ht; /* Already disabled */ if (uchan->enabled == 0) { @@ -291,8 +294,6 @@ int channel_ust_disable(struct ltt_ust_session *usess, int domain, switch (domain) { case LTTNG_DOMAIN_UST: DBG2("Channel %s being disabled in UST global domain", uchan->name); - chan_ht = usess->domain_global.channels; - /* Disable channel for global domain */ ret = ust_app_disable_channel_glb(usess, uchan); break;