Index: uspace/srv/fs/fat/fat_idx.c
===================================================================
--- uspace/srv/fs/fat/fat_idx.c	(revision 4452366c55578c3e4f4c43a1da5f4c5e3463d239)
+++ uspace/srv/fs/fat/fat_idx.c	(revision 78a1b7b61fd9804bd27c95cb57dd954ccd3becff)
@@ -74,4 +74,15 @@
 /** List of unused structures. */
 static LIST_INITIALIZE(unused_head);
+
+/** Futex protecting the up_hash and ui_hash.
+ *
+ * The locking strategy assumes that there will be at most one fibril for each
+ * dev_handle.  Therefore it will be sufficient to hold the futex for shorter
+ * times (i.e. only during hash table operations as opposed to holding it the
+ * whole time between an unsuccessful find and the following insert). Should the
+ * assumption break, the locking strategy for this futex will have to be
+ * reconsidered.
+ */
+static futex_t used_futex = FUTEX_INITIALIZER; 
 
 /**
@@ -340,5 +351,7 @@
 	};
 
+	futex_down(&used_futex);
 	l = hash_table_find(&up_hash, pkey);
+	futex_up(&used_futex);
 	if (l) {
 		fidx = hash_table_get_instance(l, fat_idx_t, uph_link);
@@ -365,6 +378,8 @@
 		fidx->nodep = NULL;
 
+		futex_down(&used_futex);
 		hash_table_insert(&up_hash, pkey, &fidx->uph_link);
 		hash_table_insert(&ui_hash, ikey, &fidx->uih_link);
+		futex_up(&used_futex);
 	}
 
@@ -382,5 +397,7 @@
 	};
 
+	futex_down(&used_futex);
 	l = hash_table_find(&ui_hash, ikey);
+	futex_up(&used_futex);
 	if (l) {
 		fidx = hash_table_get_instance(l, fat_idx_t, uih_link);
