Index: uspace/srv/fs/fat/fat_ops.c
===================================================================
--- uspace/srv/fs/fat/fat_ops.c	(revision add5835771e75bf78f021398e9c2da7a0311ca54)
+++ uspace/srv/fs/fat/fat_ops.c	(revision e811bde6f914a964b72dca0bd18b4824b04033db)
@@ -392,4 +392,5 @@
 	block_t *b;
 
+	futex_down(&parentp->idx->lock);
 	bps = fat_bps_get(parentp->idx->dev_handle);
 	dps = bps / sizeof(fat_dentry_t);
@@ -409,4 +410,5 @@
 			case FAT_DENTRY_LAST:
 				block_put(b);
+				futex_up(&parentp->idx->lock);
 				return NULL;
 			default:
@@ -418,7 +420,14 @@
 				/* hit */
 				void *node;
+				/*
+				 * Assume tree hierarchy for locking.  We
+				 * already have the parent and now we are going
+				 * to lock the child.  Never lock in the oposite
+				 * order.
+				 */
 				fat_idx_t *idx = fat_idx_get_by_pos(
 				    parentp->idx->dev_handle, parentp->firstc,
 				    i * dps + j);
+				futex_up(&parentp->idx->lock);
 				if (!idx) {
 					/*
@@ -437,5 +446,5 @@
 		block_put(b);
 	}
-
+	futex_up(&parentp->idx->lock);
 	return NULL;
 }
