Adapt lttng-modules to Linux 4.10 cpu hotplug state machine
[lttng-modules.git] / lttng-abi.c
index 4dd9273f1eb9a0551d343dfd7706b0893f45fb2d..397e1de6dd5848a0603a53a26fc264af1e65b3fd 100644 (file)
@@ -996,8 +996,11 @@ int lttng_abi_open_metadata_stream(struct file *channel_file)
                goto notransport;
        }
 
-       if (!lttng_kref_get(&session->metadata_cache->refcount))
+       if (!lttng_kref_get(&session->metadata_cache->refcount)) {
+               ret = -EOVERFLOW;
                goto kref_error;
+       }
+
        ret = lttng_abi_create_stream_fd(channel_file, stream_priv,
                        &lttng_metadata_ring_buffer_file_operations);
        if (ret < 0)
This page took 0.023776 seconds and 4 git commands to generate.