Fix: update writeback instrumentation for kernel 4.14
[lttng-modules.git] / lttng-events.c
index 95a79cf75dc10de27daf335b927043f9231bfa29..21c41133b859623e6a5ea63c65927021cb646171 100644 (file)
@@ -46,6 +46,7 @@
 #include <wrapper/random.h>
 #include <wrapper/tracepoint.h>
 #include <wrapper/list.h>
+#include <wrapper/types.h>
 #include <lttng-kernel-version.h>
 #include <lttng-events.h>
 #include <lttng-tracer.h>
@@ -131,7 +132,7 @@ struct lttng_session *lttng_session_create(void)
        int i;
 
        mutex_lock(&sessions_mutex);
-       session = kzalloc(sizeof(struct lttng_session), GFP_KERNEL);
+       session = lttng_kvzalloc(sizeof(struct lttng_session), GFP_KERNEL);
        if (!session)
                goto err;
        INIT_LIST_HEAD(&session->chan);
@@ -162,7 +163,7 @@ struct lttng_session *lttng_session_create(void)
 err_free_cache:
        kfree(metadata_cache);
 err_free_session:
-       kfree(session);
+       lttng_kvfree(session);
 err:
        mutex_unlock(&sessions_mutex);
        return NULL;
@@ -211,7 +212,7 @@ void lttng_session_destroy(struct lttng_session *session)
        kref_put(&session->metadata_cache->refcount, metadata_cache_destroy);
        list_del(&session->list);
        mutex_unlock(&sessions_mutex);
-       kfree(session);
+       lttng_kvfree(session);
 }
 
 int lttng_session_statedump(struct lttng_session *session)
@@ -1146,7 +1147,8 @@ static
 int lttng_match_enabler_star_glob(const char *desc_name,
                const char *pattern)
 {
-       if (!strutils_star_glob_match(pattern, SIZE_MAX, desc_name, SIZE_MAX))
+       if (!strutils_star_glob_match(pattern, LTTNG_SIZE_MAX,
+                       desc_name, LTTNG_SIZE_MAX))
                return 0;
        return 1;
 }
This page took 0.025993 seconds and 4 git commands to generate.