Index: uspace/srv/vfs/vfs_mount.c
===================================================================
--- uspace/srv/vfs/vfs_mount.c	(revision 7313e7a1ff97e029dfe0f5338f14e48064433810)
+++ uspace/srv/vfs/vfs_mount.c	(revision 2c2e0c695c78424862ff45bcd46b718e31113548)
@@ -46,4 +46,5 @@
 #include "vfs.h"
 
+atomic_t rootfs_futex = FUTEX_INITIALIZER;
 vfs_node_t rootfs = { 0 };
 
@@ -59,5 +60,5 @@
 	};
 
-	return vfs_lookup_internal("/", 1, root, &altroot);
+	return vfs_lookup_internal("/", strlen("/"), root, &altroot);
 }
 
@@ -150,4 +151,5 @@
 	 */
 	vfs_node_t mp;
+	futex_down(&rootfs_futex);
 	if (rootfs.fs_handle) {
 		/*
@@ -160,4 +162,5 @@
 			 * The lookup failed for some reason.
 			 */
+			futex_up(&rootfs_futex);
 			free(buf);
 			ipc_answer_fast(rid, rc, 0, 0);
@@ -168,5 +171,5 @@
 		 * We still don't have the root file system mounted.
 		 */
-		if ((size - FS_NAME_MAXLEN == 1) &&
+		if ((size - FS_NAME_MAXLEN == strlen("/")) &&
 		    (buf[FS_NAME_MAXLEN] == '/')) {
 			/*
@@ -174,4 +177,5 @@
 			 */
 			rootfs = mounted_root;
+			futex_up(&rootfs_futex);
 			free(buf);
 			ipc_answer_fast(rid, EOK, 0, 0);
@@ -182,4 +186,5 @@
 			 * being mounted first.
 			 */
+			futex_up(&rootfs_futex);
 			free(buf);
 			ipc_answer_fast(rid, ENOENT, 0, 0);
@@ -187,5 +192,6 @@
 		}
 	}
-		
+	futex_up(&rootfs_futex);
+	
 	/*
 	 * At this point, we have all necessary pieces: file system and device
