X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-abi.c;h=3be91fcfaf48ade8c42bf228038e109184fafb45;hb=2d70eed13e3c9a656eec50677940f8ef99eccabf;hp=baaf34d31952a2b0db6b732fc0c580891a059b35;hpb=0d260d3d3e28849772a060a9b1374712c0959fca;p=lttng-modules.git diff --git a/lttng-abi.c b/lttng-abi.c index baaf34d3..3be91fcf 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -30,12 +30,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include @@ -1177,11 +1177,7 @@ int lttng_abi_open_metadata_stream(struct file *channel_file) goto notransport; } - if (!lttng_kref_get(&session->metadata_cache->refcount)) { - ret = -EOVERFLOW; - goto kref_error; - } - + kref_get(&session->metadata_cache->refcount); ret = lttng_abi_create_stream_fd(channel_file, stream_priv, <tng_metadata_ring_buffer_file_operations); if (ret < 0) @@ -1193,7 +1189,6 @@ int lttng_abi_open_metadata_stream(struct file *channel_file) fd_error: kref_put(&session->metadata_cache->refcount, metadata_cache_destroy); -kref_error: module_put(metadata_stream->transport->owner); notransport: kfree(metadata_stream);