Add missing memcpy callback
[lttng-modules.git] / lib / ringbuffer / ring_buffer_frontend.c
index 6a4c241e84677e3f14f14aee282d0a00a418830a..8eb59486f808e9f936e3b3ad42512bfd3a58655d 100644 (file)
@@ -752,8 +752,8 @@ void *channel_destroy(struct channel *chan)
        ACCESS_ONCE(chan->finalized) = 1;
        wake_up_interruptible(&chan->hp_wait);
        wake_up_interruptible(&chan->read_wait);
-       kref_put(&chan->ref, channel_release);
        priv = chan->backend.priv;
+       kref_put(&chan->ref, channel_release);
        return priv;
 }
 EXPORT_SYMBOL_GPL(channel_destroy);
@@ -1702,3 +1702,14 @@ int lib_ring_buffer_reserve_slow(struct lib_ring_buffer_ctx *ctx)
        return 0;
 }
 EXPORT_SYMBOL_GPL(lib_ring_buffer_reserve_slow);
+
+int __init init_lib_ring_buffer_frontend(void)
+{
+       int cpu;
+
+       for_each_possible_cpu(cpu)
+               spin_lock_init(&per_cpu(ring_buffer_nohz_lock, cpu));
+       return 0;
+}
+
+module_init(init_lib_ring_buffer_frontend);
This page took 0.04249 seconds and 4 git commands to generate.