Index: uspace/srv/vfs/vfs.h
===================================================================
--- uspace/srv/vfs/vfs.h	(revision 041186f03cbb0a4874ba6cfc18965272bdfc198c)
+++ uspace/srv/vfs/vfs.h	(revision 230260ac1520e9dd9989ea6839eae5ce8526f60a)
@@ -36,6 +36,6 @@
 #include <ipc/ipc.h>
 #include <adt/list.h>
+#include <fibril_sync.h>
 #include <futex.h>
-#include <rwlock.h>
 #include <sys/types.h>
 #include <devmap.h>
@@ -55,5 +55,5 @@
 	vfs_info_t vfs_info;
 	fs_handle_t fs_handle;
-	futex_t phone_futex;	/**< Phone serializing futex. */
+	fibril_mutex_t phone_lock;
 	ipcarg_t phone;
 } fs_info_t;
@@ -123,5 +123,5 @@
 	 * Holding this rwlock prevents modifications of the node's contents.
 	 */
-	rwlock_t contents_rwlock;
+	fibril_rwlock_t contents_rwlock;
 } vfs_node_t;
 
@@ -132,5 +132,5 @@
 typedef struct {
 	/** Serializes access to this open file. */
-	futex_t lock;
+	fibril_mutex_t lock;
 
 	vfs_node_t *node;
@@ -166,5 +166,5 @@
 
 /** Holding this rwlock prevents changes in file system namespace. */ 
-extern rwlock_t namespace_rwlock;
+extern fibril_rwlock_t namespace_rwlock;
 
 extern int vfs_grab_phone(fs_handle_t);
Index: uspace/srv/vfs/vfs_file.c
===================================================================
--- uspace/srv/vfs/vfs_file.c	(revision 041186f03cbb0a4874ba6cfc18965272bdfc198c)
+++ uspace/srv/vfs/vfs_file.c	(revision 230260ac1520e9dd9989ea6839eae5ce8526f60a)
@@ -41,4 +41,5 @@
 #include <assert.h>
 #include <bool.h>
+#include <fibril_sync.h>
 #include "vfs.h"
 
@@ -90,5 +91,5 @@
 			
 			memset(files[i], 0, sizeof(vfs_file_t));
-			futex_initialize(&files[i]->lock, 1);
+			fibril_mutex_initialize(&files[i]->lock);
 			vfs_file_addref(files[i]);
 			return (int) i;
Index: uspace/srv/vfs/vfs_lookup.c
===================================================================
--- uspace/srv/vfs/vfs_lookup.c	(revision 041186f03cbb0a4874ba6cfc18965272bdfc198c)
+++ uspace/srv/vfs/vfs_lookup.c	(revision 230260ac1520e9dd9989ea6839eae5ce8526f60a)
@@ -166,8 +166,6 @@
 	vfs_release_phone(phone);
 	
-	async_serialize_start();
 	ipcarg_t rc;
 	async_wait_for(req, &rc);
-	async_serialize_end();
 	
 	futex_down(&plb_futex);
Index: uspace/srv/vfs/vfs_node.c
===================================================================
--- uspace/srv/vfs/vfs_node.c	(revision 041186f03cbb0a4874ba6cfc18965272bdfc198c)
+++ uspace/srv/vfs/vfs_node.c	(revision 230260ac1520e9dd9989ea6839eae5ce8526f60a)
@@ -40,5 +40,5 @@
 #include <string.h>
 #include <futex.h>
-#include <rwlock.h>
+#include <fibril_sync.h>
 #include <adt/hash_table.h>
 #include <assert.h>
@@ -178,5 +178,5 @@
 		node->type = result->type;
 		link_initialize(&node->nh_link);
-		rwlock_initialize(&node->contents_rwlock);
+		fibril_rwlock_initialize(&node->contents_rwlock);
 		hash_table_insert(&nodes, key, &node->nh_link);
 	} else {
Index: uspace/srv/vfs/vfs_ops.c
===================================================================
--- uspace/srv/vfs/vfs_ops.c	(revision 041186f03cbb0a4874ba6cfc18965272bdfc198c)
+++ uspace/srv/vfs/vfs_ops.c	(revision 230260ac1520e9dd9989ea6839eae5ce8526f60a)
@@ -45,5 +45,5 @@
 #include <bool.h>
 #include <futex.h>
-#include <rwlock.h>
+#include <fibril_sync.h>
 #include <adt/list.h>
 #include <unistd.h>
@@ -73,5 +73,5 @@
  * concurrent VFS operation which modifies the file system namespace.
  */
-RWLOCK_INITIALIZE(namespace_rwlock);
+FIBRIL_RWLOCK_INITIALIZE(namespace_rwlock);
 
 vfs_pair_t rootfs = {
@@ -96,11 +96,11 @@
 	
 	/* Resolve the path to the mountpoint. */
-	rwlock_write_lock(&namespace_rwlock);
+	fibril_rwlock_write_lock(&namespace_rwlock);
 	if (rootfs.fs_handle) {
 		/* We already have the root FS. */
 		if (str_cmp(mp, "/") == 0) {
 			/* Trying to mount root FS over root FS */
+			fibril_rwlock_write_unlock(&namespace_rwlock);
 			ipc_answer_0(rid, EBUSY);
-			rwlock_write_unlock(&namespace_rwlock);
 			return;
 		}
@@ -109,6 +109,6 @@
 		if (rc != EOK) {
 			/* The lookup failed for some reason. */
+			fibril_rwlock_write_unlock(&namespace_rwlock);
 			ipc_answer_0(rid, rc);
-			rwlock_write_unlock(&namespace_rwlock);
 			return;
 		}
@@ -116,6 +116,6 @@
 		mp_node = vfs_node_get(&mp_res);
 		if (!mp_node) {
+			fibril_rwlock_write_unlock(&namespace_rwlock);
 			ipc_answer_0(rid, ENOMEM);
-			rwlock_write_unlock(&namespace_rwlock);
 			return;
 		}
@@ -142,16 +142,16 @@
 			    str_size(opts));
 			if (rc != EOK) {
+				vfs_release_phone(phone);
 				async_wait_for(msg, NULL);
-				vfs_release_phone(phone);
+				fibril_rwlock_write_unlock(&namespace_rwlock);
 				ipc_answer_0(rid, rc);
-				rwlock_write_unlock(&namespace_rwlock);
 				return;
 			}
+			vfs_release_phone(phone);
 			async_wait_for(msg, &rc);
-			vfs_release_phone(phone);
 			
 			if (rc != EOK) {
+				fibril_rwlock_write_unlock(&namespace_rwlock);
 				ipc_answer_0(rid, rc);
-				rwlock_write_unlock(&namespace_rwlock);
 				return;
 			}
@@ -175,6 +175,6 @@
 			assert(mr_node);
 			
+			fibril_rwlock_write_unlock(&namespace_rwlock);
 			ipc_answer_0(rid, rc);
-			rwlock_write_unlock(&namespace_rwlock);
 			return;
 		} else {
@@ -183,6 +183,6 @@
 			 * being mounted first.
 			 */
+			fibril_rwlock_write_unlock(&namespace_rwlock);
 			ipc_answer_0(rid, ENOENT);
-			rwlock_write_unlock(&namespace_rwlock);
 			return;
 		}
@@ -208,11 +208,11 @@
 	rc = async_req_1_0(phone, IPC_M_CONNECTION_CLONE, mountee_phone);
 	if (rc != EOK) {
+		vfs_release_phone(phone);
 		async_wait_for(msg, NULL);
-		vfs_release_phone(phone);
 		/* Mount failed, drop reference to mp_node. */
 		if (mp_node)
 			vfs_node_put(mp_node);
 		ipc_answer_0(rid, rc);
-		rwlock_write_unlock(&namespace_rwlock);
+		fibril_rwlock_write_unlock(&namespace_rwlock);
 		return;
 	}
@@ -221,15 +221,15 @@
 	rc = ipc_data_write_start(phone, (void *)opts, str_size(opts));
 	if (rc != EOK) {
+		vfs_release_phone(phone);
 		async_wait_for(msg, NULL);
-		vfs_release_phone(phone);
 		/* Mount failed, drop reference to mp_node. */
 		if (mp_node)
 			vfs_node_put(mp_node);
-		ipc_answer_0(rid, rc);
-		rwlock_write_unlock(&namespace_rwlock);
-		return;
-	}
+		fibril_rwlock_write_unlock(&namespace_rwlock);
+		ipc_answer_0(rid, rc);
+		return;
+	}
+	vfs_release_phone(phone);
 	async_wait_for(msg, &rc);
-	vfs_release_phone(phone);
 	
 	if (rc == EOK) {
@@ -255,5 +255,5 @@
 
 	ipc_answer_0(rid, rc);
-	rwlock_write_unlock(&namespace_rwlock);
+	fibril_rwlock_write_unlock(&namespace_rwlock);
 }
 
@@ -509,7 +509,7 @@
 	 * L_DIRECTORY. Make sure that the user does not pass L_OPEN.
 	 */
-	if (((lflag & (L_FILE | L_DIRECTORY)) == 0)
-	    || ((lflag & (L_FILE | L_DIRECTORY)) == (L_FILE | L_DIRECTORY))
-	    || ((lflag & L_OPEN) != 0)) {
+	if (((lflag & (L_FILE | L_DIRECTORY)) == 0) ||
+	    ((lflag & (L_FILE | L_DIRECTORY)) == (L_FILE | L_DIRECTORY)) ||
+	    ((lflag & L_OPEN) != 0)) {
 		ipc_answer_0(rid, EINVAL);
 		return;
@@ -549,7 +549,7 @@
 	 */
 	if (lflag & L_CREATE)
-		rwlock_write_lock(&namespace_rwlock);
+		fibril_rwlock_write_lock(&namespace_rwlock);
 	else
-		rwlock_read_lock(&namespace_rwlock);
+		fibril_rwlock_read_lock(&namespace_rwlock);
 	
 	/* The path is now populated and we can call vfs_lookup_internal(). */
@@ -558,7 +558,7 @@
 	if (rc != EOK) {
 		if (lflag & L_CREATE)
-			rwlock_write_unlock(&namespace_rwlock);
+			fibril_rwlock_write_unlock(&namespace_rwlock);
 		else
-			rwlock_read_unlock(&namespace_rwlock);
+			fibril_rwlock_read_unlock(&namespace_rwlock);
 		ipc_answer_0(rid, rc);
 		free(path);
@@ -571,16 +571,16 @@
 	vfs_node_t *node = vfs_node_get(&lr);
 	if (lflag & L_CREATE)
-		rwlock_write_unlock(&namespace_rwlock);
+		fibril_rwlock_write_unlock(&namespace_rwlock);
 	else
-		rwlock_read_unlock(&namespace_rwlock);
+		fibril_rwlock_read_unlock(&namespace_rwlock);
 	
 	/* Truncate the file if requested and if necessary. */
 	if (oflag & O_TRUNC) {
-		rwlock_write_lock(&node->contents_rwlock);
+		fibril_rwlock_write_lock(&node->contents_rwlock);
 		if (node->size) {
 			rc = vfs_truncate_internal(node->fs_handle,
 			    node->dev_handle, node->index, 0);
 			if (rc) {
-				rwlock_write_unlock(&node->contents_rwlock);
+				fibril_rwlock_write_unlock(&node->contents_rwlock);
 				vfs_node_put(node);
 				ipc_answer_0(rid, rc);
@@ -589,5 +589,5 @@
 			node->size = 0;
 		}
-		rwlock_write_unlock(&node->contents_rwlock);
+		fibril_rwlock_write_unlock(&node->contents_rwlock);
 	}
 	
@@ -640,9 +640,9 @@
 	int oflag = IPC_GET_ARG4(*request);
 	
-	rwlock_read_lock(&namespace_rwlock);
+	fibril_rwlock_read_lock(&namespace_rwlock);
 	
 	int rc = vfs_open_node_internal(&lr);
 	if (rc != EOK) {
-		rwlock_read_unlock(&namespace_rwlock);
+		fibril_rwlock_read_unlock(&namespace_rwlock);
 		ipc_answer_0(rid, rc);
 		return;
@@ -650,14 +650,14 @@
 	
 	vfs_node_t *node = vfs_node_get(&lr);
-	rwlock_read_unlock(&namespace_rwlock);
+	fibril_rwlock_read_unlock(&namespace_rwlock);
 	
 	/* Truncate the file if requested and if necessary. */
 	if (oflag & O_TRUNC) {
-		rwlock_write_lock(&node->contents_rwlock);
+		fibril_rwlock_write_lock(&node->contents_rwlock);
 		if (node->size) {
 			rc = vfs_truncate_internal(node->fs_handle,
 			    node->dev_handle, node->index, 0);
 			if (rc) {
-				rwlock_write_unlock(&node->contents_rwlock);
+				fibril_rwlock_write_unlock(&node->contents_rwlock);
 				vfs_node_put(node);
 				ipc_answer_0(rid, rc);
@@ -666,5 +666,5 @@
 			node->size = 0;
 		}
-		rwlock_write_unlock(&node->contents_rwlock);
+		fibril_rwlock_write_unlock(&node->contents_rwlock);
 	}
 	
@@ -709,6 +709,6 @@
 	}
 	
-	ipc_answer_3(rid, EOK, file->node->fs_handle,
-	    file->node->dev_handle, file->node->index);
+	ipc_answer_3(rid, EOK, file->node->fs_handle, file->node->dev_handle,
+	    file->node->index);
 }
 
@@ -728,5 +728,5 @@
 	 * the same open file at a time.
 	 */
-	futex_down(&file->lock);
+	fibril_mutex_lock(&file->lock);
 	int fs_phone = vfs_grab_phone(file->node->fs_handle);
 	
@@ -737,10 +737,11 @@
 	    file->node->dev_handle, file->node->index, &answer);
 	
+	vfs_release_phone(fs_phone);
+
 	/* Wait for reply from the FS server. */
 	ipcarg_t rc;
 	async_wait_for(msg, &rc);
 	
-	vfs_release_phone(fs_phone);
-	futex_up(&file->lock);
+	fibril_mutex_unlock(&file->lock);
 	
 	ipc_answer_1(rid, EOK, IPC_GET_ARG1(answer));
@@ -762,5 +763,5 @@
 	 * the same open file at a time.
 	 */
-	futex_down(&file->lock);
+	fibril_mutex_lock(&file->lock);
 	int fs_phone = vfs_grab_phone(file->node->fs_handle);
 	
@@ -770,11 +771,12 @@
 	msg = async_send_2(fs_phone, IPC_GET_METHOD(*request),
 	    file->node->dev_handle, file->node->index, &answer);
-	
+
+	vfs_release_phone(fs_phone);
+
 	/* Wait for reply from the FS server. */
 	ipcarg_t rc;
 	async_wait_for(msg, &rc);
 	
-	vfs_release_phone(fs_phone);
-	futex_up(&file->lock);
+	fibril_mutex_unlock(&file->lock);
 	
 	ipc_answer_0(rid, rc);
@@ -796,5 +798,5 @@
 	 * the same open file at a time.
 	 */
-	futex_down(&file->lock);
+	fibril_mutex_lock(&file->lock);
 	
 	int fs_phone = vfs_grab_phone(file->node->fs_handle);
@@ -805,4 +807,6 @@
 	msg = async_send_2(fs_phone, IPC_GET_METHOD(*request),
 	    file->node->dev_handle, file->node->index, &answer);
+
+	vfs_release_phone(fs_phone);
 	
 	/* Wait for reply from the FS server. */
@@ -810,6 +814,5 @@
 	async_wait_for(msg, &rc);
 	
-	vfs_release_phone(fs_phone);
-	futex_up(&file->lock);
+	fibril_mutex_unlock(&file->lock);
 	
 	int retval = IPC_GET_ARG1(answer);
@@ -863,5 +866,5 @@
 	 * the same open file at a time.
 	 */
-	futex_down(&file->lock);
+	fibril_mutex_lock(&file->lock);
 
 	/*
@@ -870,7 +873,7 @@
 	 */
 	if (read)
-		rwlock_read_lock(&file->node->contents_rwlock);
+		fibril_rwlock_read_lock(&file->node->contents_rwlock);
 	else
-		rwlock_write_lock(&file->node->contents_rwlock);
+		fibril_rwlock_write_lock(&file->node->contents_rwlock);
 
 	if (file->node->type == VFS_NODE_DIRECTORY) {
@@ -880,5 +883,5 @@
 		 */
 		assert(read);
-		rwlock_read_lock(&namespace_rwlock);
+		fibril_rwlock_read_lock(&namespace_rwlock);
 	}
 	
@@ -900,4 +903,6 @@
 	 */
 	ipc_forward_fast(callid, fs_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME);
+
+	vfs_release_phone(fs_phone);
 	
 	/* Wait for reply from the FS server. */
@@ -905,19 +910,17 @@
 	async_wait_for(msg, &rc);
 	
-	vfs_release_phone(fs_phone);
-	
 	size_t bytes = IPC_GET_ARG1(answer);
 
 	if (file->node->type == VFS_NODE_DIRECTORY)
-		rwlock_read_unlock(&namespace_rwlock);
+		fibril_rwlock_read_unlock(&namespace_rwlock);
 	
 	/* Unlock the VFS node. */
 	if (read)
-		rwlock_read_unlock(&file->node->contents_rwlock);
+		fibril_rwlock_read_unlock(&file->node->contents_rwlock);
 	else {
 		/* Update the cached version of node's size. */
 		if (rc == EOK)
 			file->node->size = IPC_GET_ARG2(answer); 
-		rwlock_write_unlock(&file->node->contents_rwlock);
+		fibril_rwlock_write_unlock(&file->node->contents_rwlock);
 	}
 	
@@ -925,5 +928,5 @@
 	if (rc == EOK)
 		file->pos += bytes;
-	futex_up(&file->lock);
+	fibril_mutex_unlock(&file->lock);
 	
 	/*
@@ -959,8 +962,8 @@
 
 	off_t newpos;
-	futex_down(&file->lock);
+	fibril_mutex_lock(&file->lock);
 	if (whence == SEEK_SET) {
 		file->pos = off;
-		futex_up(&file->lock);
+		fibril_mutex_unlock(&file->lock);
 		ipc_answer_1(rid, EOK, off);
 		return;
@@ -968,5 +971,5 @@
 	if (whence == SEEK_CUR) {
 		if (file->pos + off < file->pos) {
-			futex_up(&file->lock);
+			fibril_mutex_unlock(&file->lock);
 			ipc_answer_0(rid, EOVERFLOW);
 			return;
@@ -974,23 +977,23 @@
 		file->pos += off;
 		newpos = file->pos;
-		futex_up(&file->lock);
+		fibril_mutex_unlock(&file->lock);
 		ipc_answer_1(rid, EOK, newpos);
 		return;
 	}
 	if (whence == SEEK_END) {
-		rwlock_read_lock(&file->node->contents_rwlock);
+		fibril_rwlock_read_lock(&file->node->contents_rwlock);
 		size_t size = file->node->size;
-		rwlock_read_unlock(&file->node->contents_rwlock);
+		fibril_rwlock_read_unlock(&file->node->contents_rwlock);
 		if (size + off < size) {
-			futex_up(&file->lock);
+			fibril_mutex_unlock(&file->lock);
 			ipc_answer_0(rid, EOVERFLOW);
 			return;
 		}
 		newpos = size + off;
-		futex_up(&file->lock);
+		fibril_mutex_unlock(&file->lock);
 		ipc_answer_1(rid, EOK, newpos);
 		return;
 	}
-	futex_up(&file->lock);
+	fibril_mutex_unlock(&file->lock);
 	ipc_answer_0(rid, EINVAL);
 }
@@ -1021,14 +1024,14 @@
 		return;
 	}
-	futex_down(&file->lock);
-
-	rwlock_write_lock(&file->node->contents_rwlock);
+	fibril_mutex_lock(&file->lock);
+
+	fibril_rwlock_write_lock(&file->node->contents_rwlock);
 	rc = vfs_truncate_internal(file->node->fs_handle,
 	    file->node->dev_handle, file->node->index, size);
 	if (rc == EOK)
 		file->node->size = size;
-	rwlock_write_unlock(&file->node->contents_rwlock);
-
-	futex_up(&file->lock);
+	fibril_rwlock_write_unlock(&file->node->contents_rwlock);
+
+	fibril_mutex_unlock(&file->lock);
 	ipc_answer_0(rid, (ipcarg_t)rc);
 }
@@ -1060,8 +1063,8 @@
 	path[len] = '\0';
 	
-	rwlock_write_lock(&namespace_rwlock);
+	fibril_rwlock_write_lock(&namespace_rwlock);
 	int lflag = L_DIRECTORY | L_CREATE | L_EXCLUSIVE;
 	rc = vfs_lookup_internal(path, lflag, NULL, NULL);
-	rwlock_write_unlock(&namespace_rwlock);
+	fibril_rwlock_write_unlock(&namespace_rwlock);
 	free(path);
 	ipc_answer_0(rid, rc);
@@ -1094,5 +1097,5 @@
 	path[len] = '\0';
 	
-	rwlock_write_lock(&namespace_rwlock);
+	fibril_rwlock_write_lock(&namespace_rwlock);
 	lflag &= L_DIRECTORY;	/* sanitize lflag */
 	vfs_lookup_res_t lr;
@@ -1100,5 +1103,5 @@
 	free(path);
 	if (rc != EOK) {
-		rwlock_write_unlock(&namespace_rwlock);
+		fibril_rwlock_write_unlock(&namespace_rwlock);
 		ipc_answer_0(rid, rc);
 		return;
@@ -1114,5 +1117,5 @@
 	node->lnkcnt--;
 	futex_up(&nodes_futex);
-	rwlock_write_unlock(&namespace_rwlock);
+	fibril_rwlock_write_unlock(&namespace_rwlock);
 	vfs_node_put(node);
 	ipc_answer_0(rid, EOK);
@@ -1195,9 +1198,9 @@
 	vfs_lookup_res_t new_lr;
 	vfs_lookup_res_t new_par_lr;
-	rwlock_write_lock(&namespace_rwlock);
+	fibril_rwlock_write_lock(&namespace_rwlock);
 	/* Lookup the node belonging to the old file name. */
 	rc = vfs_lookup_internal(oldc, L_NONE, &old_lr, NULL);
 	if (rc != EOK) {
-		rwlock_write_unlock(&namespace_rwlock);
+		fibril_rwlock_write_unlock(&namespace_rwlock);
 		ipc_answer_0(rid, rc);
 		free(old);
@@ -1207,5 +1210,5 @@
 	vfs_node_t *old_node = vfs_node_get(&old_lr);
 	if (!old_node) {
-		rwlock_write_unlock(&namespace_rwlock);
+		fibril_rwlock_write_unlock(&namespace_rwlock);
 		ipc_answer_0(rid, ENOMEM);
 		free(old);
@@ -1216,5 +1219,5 @@
 	char *parentc = str_dup(newc);
 	if (!parentc) {
-		rwlock_write_unlock(&namespace_rwlock);
+		fibril_rwlock_write_unlock(&namespace_rwlock);
 		ipc_answer_0(rid, rc);
 		free(old);
@@ -1231,5 +1234,5 @@
 	free(parentc);	/* not needed anymore */
 	if (rc != EOK) {
-		rwlock_write_unlock(&namespace_rwlock);
+		fibril_rwlock_write_unlock(&namespace_rwlock);
 		ipc_answer_0(rid, rc);
 		free(old);
@@ -1240,5 +1243,5 @@
 	if ((old_node->fs_handle != new_par_lr.triplet.fs_handle) ||
 	    (old_node->dev_handle != new_par_lr.triplet.dev_handle)) {
-		rwlock_write_unlock(&namespace_rwlock);
+		fibril_rwlock_write_unlock(&namespace_rwlock);
 		ipc_answer_0(rid, EXDEV);	/* different file systems */
 		free(old);
@@ -1256,5 +1259,5 @@
 		new_node = vfs_node_get(&new_lr);
 		if (!new_node) {
-			rwlock_write_unlock(&namespace_rwlock);
+			fibril_rwlock_write_unlock(&namespace_rwlock);
 			ipc_answer_0(rid, ENOMEM);
 			free(old);
@@ -1267,5 +1270,5 @@
 		break;
 	default:
-		rwlock_write_unlock(&namespace_rwlock);
+		fibril_rwlock_write_unlock(&namespace_rwlock);
 		ipc_answer_0(rid, ENOTEMPTY);
 		free(old);
@@ -1276,5 +1279,5 @@
 	rc = vfs_lookup_internal(newc, L_LINK, NULL, NULL, old_node->index);
 	if (rc != EOK) {
-		rwlock_write_unlock(&namespace_rwlock);
+		fibril_rwlock_write_unlock(&namespace_rwlock);
 		if (new_node)
 			vfs_node_put(new_node);
@@ -1290,5 +1293,5 @@
 	rc = vfs_lookup_internal(oldc, L_UNLINK, NULL, NULL);
 	if (rc != EOK) {
-		rwlock_write_unlock(&namespace_rwlock);
+		fibril_rwlock_write_unlock(&namespace_rwlock);
 		vfs_node_put(old_node);
 		if (new_node)
@@ -1302,5 +1305,5 @@
 	old_node->lnkcnt--;
 	futex_up(&nodes_futex);
-	rwlock_write_unlock(&namespace_rwlock);
+	fibril_rwlock_write_unlock(&namespace_rwlock);
 	vfs_node_put(old_node);
 	if (new_node)
Index: uspace/srv/vfs/vfs_register.c
===================================================================
--- uspace/srv/vfs/vfs_register.c	(revision 041186f03cbb0a4874ba6cfc18965272bdfc198c)
+++ uspace/srv/vfs/vfs_register.c	(revision 230260ac1520e9dd9989ea6839eae5ce8526f60a)
@@ -46,5 +46,5 @@
 #include <ctype.h>
 #include <bool.h>
-#include <futex.h>
+#include <fibril_sync.h>
 #include <adt/list.h>
 #include <as.h>
@@ -53,5 +53,5 @@
 #include "vfs.h"
 
-atomic_t fs_head_futex = FUTEX_INITIALIZER;
+FIBRIL_MUTEX_INITIALIZE(fs_head_lock);
 link_t fs_head;
 
@@ -160,5 +160,5 @@
 	}
 	link_initialize(&fs_info->fs_link);
-	futex_initialize(&fs_info->phone_futex, 1);
+	fibril_mutex_initialize(&fs_info->phone_lock);
 		
 	rc = ipc_data_write_finalize(callid, &fs_info->vfs_info, size);
@@ -181,6 +181,5 @@
 	}
 		
-	futex_down(&fs_head_futex);
-	fibril_inc_sercount();
+	fibril_mutex_lock(&fs_head_lock);
 
 	/*
@@ -192,6 +191,5 @@
 		 */
 		dprintf("FS is already registered.\n");
-		fibril_dec_sercount();
-		futex_up(&fs_head_futex);
+		fibril_mutex_unlock(&fs_head_lock);
 		free(fs_info);
 		ipc_answer_0(callid, EEXISTS);
@@ -215,6 +213,5 @@
 		dprintf("Unexpected call, method = %d\n", IPC_GET_METHOD(call));
 		list_remove(&fs_info->fs_link);
-		fibril_dec_sercount();
-		futex_up(&fs_head_futex);
+		fibril_mutex_unlock(&fs_head_lock);
 		free(fs_info);
 		ipc_answer_0(callid, EINVAL);
@@ -234,6 +231,5 @@
 		dprintf("Unexpected call, method = %d\n", IPC_GET_METHOD(call));
 		list_remove(&fs_info->fs_link);
-		fibril_dec_sercount();
-		futex_up(&fs_head_futex);
+		fibril_mutex_unlock(&fs_head_lock);
 		ipc_hangup(fs_info->phone);
 		free(fs_info);
@@ -249,6 +245,5 @@
 		dprintf("Client suggests wrong size of PFB, size = %d\n", size);
 		list_remove(&fs_info->fs_link);
-		fibril_dec_sercount();
-		futex_up(&fs_head_futex);
+		fibril_mutex_unlock(&fs_head_lock);
 		ipc_hangup(fs_info->phone);
 		free(fs_info);
@@ -274,6 +269,5 @@
 	ipc_answer_1(rid, EOK, (ipcarg_t) fs_info->fs_handle);
 	
-	fibril_dec_sercount();
-	futex_up(&fs_head_futex);
+	fibril_mutex_unlock(&fs_head_lock);
 	
 	dprintf("\"%.*s\" filesystem successfully registered, handle=%d.\n",
@@ -298,5 +292,5 @@
 	 * phone_futex and keep it until vfs_release_phone().
 	 */
-	futex_down(&fs_head_futex);
+	fibril_mutex_lock(&fs_head_lock);
 	link_t *cur;
 	fs_info_t *fs;
@@ -304,20 +298,10 @@
 		fs = list_get_instance(cur, fs_info_t, fs_link);
 		if (fs->fs_handle == handle) {
-			futex_up(&fs_head_futex);
-			/*
-			 * For now, take the futex unconditionally.
-			 * Oh yeah, serialization rocks.
-			 * It will be up'ed in vfs_release_phone().
-			 */
-			futex_down(&fs->phone_futex);
-			/*
-			 * Avoid deadlock with other fibrils in the same thread
-			 * by disabling fibril preemption.
-			 */
-			fibril_inc_sercount();
+			fibril_mutex_unlock(&fs_head_lock);
+			fibril_mutex_lock(&fs->phone_lock);
 			return fs->phone;
 		}
 	}
-	futex_up(&fs_head_futex);
+	fibril_mutex_unlock(&fs_head_lock);
 	return 0;
 }
@@ -331,10 +315,5 @@
 	bool found = false;
 
-	/*
-	 * Undo the fibril_inc_sercount() done in vfs_grab_phone().
-	 */
-	fibril_dec_sercount();
-	
-	futex_down(&fs_head_futex);
+	fibril_mutex_lock(&fs_head_lock);
 	link_t *cur;
 	for (cur = fs_head.next; cur != &fs_head; cur = cur->next) {
@@ -342,10 +321,10 @@
 		if (fs->phone == phone) {
 			found = true;
-			futex_up(&fs_head_futex);
-			futex_up(&fs->phone_futex);
+			fibril_mutex_unlock(&fs_head_lock);
+			fibril_mutex_unlock(&fs->phone_lock);
 			return;
 		}
 	}
-	futex_up(&fs_head_futex);
+	fibril_mutex_unlock(&fs_head_lock);
 
 	/*
@@ -358,6 +337,6 @@
  *
  * @param name		File system name.
- * @param lock		If true, the function will down and up the
- * 			fs_head_futex.
+ * @param lock		If true, the function will lock and unlock the
+ * 			fs_head_lock.
  *
  * @return		File system handle or zero if file system not found.
@@ -368,5 +347,5 @@
 	
 	if (lock)
-		futex_down(&fs_head_futex);
+		fibril_mutex_lock(&fs_head_lock);
 	link_t *cur;
 	for (cur = fs_head.next; cur != &fs_head; cur = cur->next) {
@@ -378,5 +357,5 @@
 	}
 	if (lock)
-		futex_up(&fs_head_futex);
+		fibril_mutex_unlock(&fs_head_lock);
 	return handle;
 }
