Fix teardown event vs session
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 21 May 2011 17:45:43 +0000 (13:45 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 21 May 2011 17:45:43 +0000 (13:45 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ltt-debugfs-abi.c
ltt-events.c
ltt-events.h

index 02f7232ccb67f2b89ac9d446f14bb2daf043d123..046fca43cc4ee987ff2ee59a42d19296e0e7b190 100644 (file)
@@ -534,10 +534,8 @@ int lttng_event_release(struct inode *inode, struct file *file)
 {
        struct ltt_event *event = file->private_data;
 
-       if (event) {
-               ltt_event_unregister(event);
+       if (event)
                fput(event->chan->file);
-       }
        return 0;
 }
 
index 61b9de6af5a649829252f9e8b24e553078b36534..6d9eafaa7676d81cbaa0bbb4f64e6322114a5641 100644 (file)
@@ -23,6 +23,7 @@ static DEFINE_MUTEX(sessions_mutex);
 static struct kmem_cache *event_cache;
 
 static void _ltt_event_destroy(struct ltt_event *event);
+static void _ltt_channel_destroy(struct ltt_channel *chan);
 static int _ltt_event_unregister(struct ltt_event *event);
 static
 int _ltt_event_metadata_statedump(struct ltt_session *session,
@@ -191,6 +192,7 @@ active:
 /*
  * Only used internally at session destruction.
  */
+static
 void _ltt_channel_destroy(struct ltt_channel *chan)
 {
        chan->ops->channel_destroy(chan->chan);
@@ -308,19 +310,6 @@ int _ltt_event_unregister(struct ltt_event *event)
        return ret;
 }
 
-/*
- * Used when an event FD is released.
- */
-int ltt_event_unregister(struct ltt_event *event)
-{
-       int ret;
-
-       mutex_lock(&sessions_mutex);
-       ret = ltt_event_unregister(event);
-       mutex_unlock(&sessions_mutex);
-       return ret;
-}
-
 /*
  * Only used internally at session destruction.
  */
index 015bbffdd063102b46e42761c06f72928aa6aa6c..d07f1c879d2d44e4a1fa76cf6da372e723d7b527 100644 (file)
@@ -242,13 +242,11 @@ struct ltt_channel *ltt_global_channel_create(struct ltt_session *session,
                                       size_t subbuf_size, size_t num_subbuf,
                                       unsigned int switch_timer_interval,
                                       unsigned int read_timer_interval);
-void _ltt_channel_destroy(struct ltt_channel *chan);
 
 struct ltt_event *ltt_event_create(struct ltt_channel *chan,
                                   char *name,
                                   struct lttng_kernel_event *event_param,
                                   void *filter);
-int ltt_event_unregister(struct ltt_event *event);
 
 void ltt_transport_register(struct ltt_transport *transport);
 void ltt_transport_unregister(struct ltt_transport *transport);
This page took 0.028326 seconds and 4 git commands to generate.