X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=lttng-sessiond%2Fcontext.c;h=c7c902197df34fa54143bec06dd437f8db5bf017;hp=732dc929d55ca8a1fa81dcab50bc31dc438c5f80;hb=4771f025b27e92983c1c0816c4cf5760d229c287;hpb=5485f82241185e6703fe343704c48d2a6d6a4b46 diff --git a/lttng-sessiond/context.c b/lttng-sessiond/context.c index 732dc929d..c7c902197 100644 --- a/lttng-sessiond/context.c +++ b/lttng-sessiond/context.c @@ -27,7 +27,7 @@ #include "context.h" #include "hashtable.h" -#include "kernel-ctl.h" +#include "kernel.h" /* * Add kernel context to an event of a specific channel. @@ -260,14 +260,12 @@ static int add_ustctx_all_channels(struct ltt_ust_session *ustsession, // ustctx, ustchan->obj, &context_data); if (ret < 0) { ret = LTTCOMM_UST_CONTEXT_FAIL; - rcu_read_unlock(); goto error; } } else { ret = add_ustctx_to_event(ustsession, ustctx, ustchan, event_name); if (ret < 0) { ret = LTTCOMM_UST_CONTEXT_FAIL; - rcu_read_unlock(); goto error; } else if (ret == 1) { /* Event found and context added */ @@ -277,16 +275,13 @@ static int add_ustctx_all_channels(struct ltt_ust_session *ustsession, } hashtable_get_next(channels, &iter); } - rcu_read_unlock(); - if (!found && !no_event) { ret = LTTCOMM_NO_EVENT; goto error; } - ret = LTTCOMM_OK; - error: + rcu_read_unlock(); return ret; #endif return 0;