Index: uspace/srv/vfs/vfs.c
===================================================================
--- uspace/srv/vfs/vfs.c	(revision 26360f7216dd5f971430bcd57a1459a4cc0665fa)
+++ uspace/srv/vfs/vfs.c	(revision 953769ff5f13f913fbf03e6f1b8aac2f414094f6)
@@ -46,4 +46,5 @@
 #include <adt/list.h>
 #include <atomic.h>
+#include <assert.h>
 #include "vfs.h"
 
@@ -175,8 +176,14 @@
 	
 	/*
-	 * Set a connectio handling function/fibril.
-	 */
-	async_set_pending(vfs_process_pending_mount);
+	 * Set a connection handling function/fibril.
+	 */
 	async_set_client_connection(vfs_connection);
+
+	/*
+	 * Add a fibril for handling pending mounts.
+	 */
+	fid_t fid = fibril_create(vfs_process_pending_mount, NULL);
+	assert(fid);
+	fibril_add_ready(fid);
 	
 	/*
Index: uspace/srv/vfs/vfs.h
===================================================================
--- uspace/srv/vfs/vfs.h	(revision 26360f7216dd5f971430bcd57a1459a4cc0665fa)
+++ uspace/srv/vfs/vfs.h	(revision 953769ff5f13f913fbf03e6f1b8aac2f414094f6)
@@ -170,4 +170,8 @@
 extern int vfs_grab_phone(fs_handle_t);
 extern void vfs_release_phone(int);
+
+extern fibril_mutex_t fs_head_lock;
+extern bool pending_new_fs;
+extern fibril_condvar_t pending_cv;
 
 extern fs_handle_t fs_name_to_handle(char *, bool);
Index: uspace/srv/vfs/vfs_ops.c
===================================================================
--- uspace/srv/vfs/vfs_ops.c	(revision 26360f7216dd5f971430bcd57a1459a4cc0665fa)
+++ uspace/srv/vfs/vfs_ops.c	(revision 953769ff5f13f913fbf03e6f1b8aac2f414094f6)
@@ -67,5 +67,6 @@
 } pending_req_t;
 
-FIBRIL_MUTEX_INITIALIZE(pending_lock);
+FIBRIL_CONDVAR_INITIALIZE(pending_cv);
+bool pending_new_fs = false;	/**< True if a new file system was mounted. */
 LIST_INITIALIZE(pending_req);
 
@@ -264,30 +265,39 @@
 	link_t *cur;
 	
-loop:
-	fibril_mutex_lock(&pending_lock);
-	for (cur = pending_req.next; cur != &pending_req; cur = cur->next) {
-		pending_req_t *pr = list_get_instance(cur, pending_req_t, link);
-
-		fs_handle_t fs_handle = fs_name_to_handle(pr->fs_name, true);
-		if (!fs_handle)
-			continue;
+	while (true) {
+		fibril_mutex_lock(&fs_head_lock);
+		while (!pending_new_fs)
+			fibril_condvar_wait(&pending_cv, &fs_head_lock);
+rescan:
+		for (cur = pending_req.next; cur != &pending_req;
+		    cur = cur->next) {
+			pending_req_t *pr = list_get_instance(cur,
+			    pending_req_t, link);
+			fs_handle_t fs_handle = fs_name_to_handle(pr->fs_name,
+			    false);
+			if (!fs_handle)
+				continue;
 		
-		/* Acknowledge that we know fs_name. */
-		ipc_answer_0(pr->callid, EOK);
+			/* Acknowledge that we know fs_name. */
+			ipc_answer_0(pr->callid, EOK);
 		
-		/* Do the mount */
-		vfs_mount_internal(pr->rid, pr->dev_handle, fs_handle, pr->mp,
-		    pr->opts);
+			list_remove(cur);
+			fibril_mutex_unlock(&fs_head_lock);
+			
+			/* Do the mount */
+			vfs_mount_internal(pr->rid, pr->dev_handle, fs_handle,
+			    pr->mp, pr->opts);
+
+			free(pr->fs_name);
+			free(pr->mp);
+			free(pr->opts);
+			free(pr);
 		
-		free(pr->fs_name);
-		free(pr->mp);
-		free(pr->opts);
-		list_remove(cur);
-		free(pr);
-		fibril_mutex_unlock(&pending_lock);
-		fibril_yield();
-		goto loop;
-	}
-	fibril_mutex_unlock(&pending_lock);
+			fibril_mutex_lock(&fs_head_lock);
+			goto rescan;
+		}
+		pending_new_fs = false;
+		fibril_mutex_unlock(&fs_head_lock);
+	}
 }
 
@@ -445,5 +455,6 @@
 	 * This will also give us its file system handle.
 	 */
-	fs_handle_t fs_handle = fs_name_to_handle(fs_name, true);
+	fibril_mutex_lock(&fs_head_lock);
+	fs_handle_t fs_handle = fs_name_to_handle(fs_name, false);
 	if (!fs_handle) {
 		if (flags & IPC_FLAG_BLOCKING) {
@@ -453,4 +464,5 @@
 			pr = (pending_req_t *) malloc(sizeof(pending_req_t));
 			if (!pr) {
+				fibril_mutex_unlock(&fs_head_lock);
 				ipc_answer_0(callid, ENOMEM);
 				ipc_answer_0(rid, ENOMEM);
@@ -468,10 +480,10 @@
 			pr->dev_handle = dev_handle;
 			link_initialize(&pr->link);
-			fibril_mutex_lock(&pending_lock);
 			list_append(&pr->link, &pending_req);
-			fibril_mutex_unlock(&pending_lock);
+			fibril_mutex_unlock(&fs_head_lock);
 			return;
 		}
 		
+		fibril_mutex_unlock(&fs_head_lock);
 		ipc_answer_0(callid, ENOENT);
 		ipc_answer_0(rid, ENOENT);
@@ -481,4 +493,5 @@
 		return;
 	}
+	fibril_mutex_unlock(&fs_head_lock);
 	
 	/* Acknowledge that we know fs_name. */
Index: uspace/srv/vfs/vfs_register.c
===================================================================
--- uspace/srv/vfs/vfs_register.c	(revision 26360f7216dd5f971430bcd57a1459a4cc0665fa)
+++ uspace/srv/vfs/vfs_register.c	(revision 953769ff5f13f913fbf03e6f1b8aac2f414094f6)
@@ -269,4 +269,6 @@
 	ipc_answer_1(rid, EOK, (ipcarg_t) fs_info->fs_handle);
 	
+	pending_new_fs = true;
+	fibril_condvar_signal(&pending_cv);
 	fibril_mutex_unlock(&fs_head_lock);
 	
