Index: uspace/srv/fs/fat/fat_ops.c
===================================================================
--- uspace/srv/fs/fat/fat_ops.c	(revision 4b4668e50d198088fac7dd92f331c46d4657a01d)
+++ uspace/srv/fs/fat/fat_ops.c	(revision d27ed127903ea6d811485f75c5dc394ec19f814e)
@@ -606,5 +606,6 @@
 	    (childp->idx->pdi * sizeof(fat_dentry_t)) / bps,
 	    BLOCK_FLAGS_NONE);
-	assert(rc == EOK);
+	if (rc != EOK) 
+		goto error;
 	d = (fat_dentry_t *)b->data +
 	    (childp->idx->pdi % (bps / sizeof(fat_dentry_t)));
@@ -613,5 +614,6 @@
 	b->dirty = true;		/* need to sync block */
 	rc = block_put(b);
-	assert(rc == EOK);
+	if (rc != EOK)
+		goto error;
 
 	/* remove the index structure from the position hash */
@@ -627,4 +629,10 @@
 
 	return EOK;
+
+error:
+	fibril_mutex_unlock(&parentp->idx->lock);
+	fibril_mutex_unlock(&childp->lock);
+	fibril_mutex_unlock(&childp->idx->lock);
+	return rc;
 }
 
