Index: uspace/srv/logger/namespace.c
===================================================================
--- uspace/srv/logger/namespace.c	(revision ceafd1bbf62ffe403d659365a50c3b6def271637)
+++ uspace/srv/logger/namespace.c	(revision 01b8c2e4ec8fecf9f68a17cee1ffe702d9a9cb59)
@@ -90,10 +90,8 @@
 }
 
-logging_namespace_t *namespace_create(const char *name)
-{
-	fibril_mutex_lock(&namespace_list_guard);
+static logging_namespace_t *namespace_create_no_lock(const char *name)
+{
 	logging_namespace_t *existing = namespace_find_no_lock(name);
 	if (existing != NULL) {
-		fibril_mutex_unlock(&namespace_list_guard);
 		return NULL;
 	}
@@ -101,5 +99,4 @@
 	logging_namespace_t *namespace = malloc(sizeof(logging_namespace_t));
 	if (namespace == NULL) {
-		fibril_mutex_unlock(&namespace_list_guard);
 		return NULL;
 	}
@@ -107,5 +104,4 @@
 	namespace->name = str_dup(name);
 	if (namespace->name == NULL) {
-		fibril_mutex_unlock(&namespace_list_guard);
 		free(namespace);
 		return NULL;
@@ -119,7 +115,15 @@
 
 	list_append(&namespace->link, &namespace_list);
-	fibril_mutex_unlock(&namespace_list_guard);
 
 	return namespace;
+}
+
+
+logging_namespace_t *namespace_create(const char *name)
+{
+	fibril_mutex_lock(&namespace_list_guard);
+	logging_namespace_t *result = namespace_create_no_lock(name);
+	fibril_mutex_unlock(&namespace_list_guard);
+	return result;
 }
 
@@ -186,5 +190,5 @@
 
 	if (namespace == NULL) {
-		namespace = namespace_create(name);
+		namespace = namespace_create_no_lock(name);
 	}
 
