Index: uspace/srv/fs/fat/fat_fat.c
===================================================================
--- uspace/srv/fs/fat/fat_fat.c	(revision 5f116e7d19efeead0cc8ac08e14c7139f1709ba4)
+++ uspace/srv/fs/fat/fat_fat.c	(revision cd688d9d407ba17ea6df2aeaa333efe0c6c756d1)
@@ -75,4 +75,5 @@
 	uint16_t clusters = 0;
 	fat_cluster_t clst = firstc;
+	int rc;
 
 	bps = uint16_t_le2host(bs->bps);
@@ -96,8 +97,10 @@
 		fidx = clst % (bps / sizeof(fat_cluster_t));
 		/* read FAT1 */
-		b = block_get(dev_handle, rscnt + fsec, BLOCK_FLAGS_NONE);
+		rc = block_get(&b, dev_handle, rscnt + fsec, BLOCK_FLAGS_NONE);
+		assert(rc == EOK);
 		clst = uint16_t_le2host(((fat_cluster_t *)b->data)[fidx]);
 		assert(clst != FAT_CLST_BAD);
-		block_put(b);
+		rc = block_put(b);
+		assert(rc == EOK);
 		clusters++;
 	}
@@ -133,4 +136,5 @@
 	unsigned clusters, max_clusters;
 	fat_cluster_t lastc;
+	int rc;
 
 	bps = uint16_t_le2host(bs->bps);
@@ -146,5 +150,7 @@
 		/* root directory special case */
 		assert(bn < rds);
-		b = block_get(dev_handle, rscnt + bs->fatcnt * sf + bn, flags);
+		rc = block_get(&b, dev_handle, rscnt + bs->fatcnt * sf + bn,
+		    flags);
+		assert(rc == EOK);
 		return b;
 	}
@@ -155,6 +161,7 @@
 	assert(clusters == max_clusters);
 
-	b = block_get(dev_handle, ssa + (lastc - FAT_CLST_FIRST) * bs->spc +
-	    bn % bs->spc, flags);
+	rc = block_get(&b, dev_handle, ssa +
+	    (lastc - FAT_CLST_FIRST) * bs->spc + bn % bs->spc, flags);
+	assert(rc == EOK);
 
 	return b;
@@ -177,4 +184,5 @@
 	block_t *b;
 	off_t o, boundary;
+	int rc;
 
 	bps = uint16_t_le2host(bs->bps);
@@ -191,5 +199,6 @@
 		memset(b->data + o % bps, 0, bps - o % bps);
 		b->dirty = true;		/* need to sync node */
-		block_put(b);
+		rc = block_put(b);
+		assert(rc == EOK);
 	}
 	
@@ -203,5 +212,6 @@
 		memset(b->data, 0, min(bps, pos - o));
 		b->dirty = true;		/* need to sync node */
-		block_put(b);
+		rc = block_put(b);
+		assert(rc == EOK);
 	}
 }
@@ -222,13 +232,16 @@
 	uint16_t rscnt;
 	fat_cluster_t *cp, value;
+	int rc;
 
 	bps = uint16_t_le2host(bs->bps);
 	rscnt = uint16_t_le2host(bs->rscnt);
 
-	b = block_get(dev_handle, rscnt + (clst * sizeof(fat_cluster_t)) / bps,
-	    BLOCK_FLAGS_NONE);
+	rc = block_get(&b, dev_handle, rscnt +
+	    (clst * sizeof(fat_cluster_t)) / bps, BLOCK_FLAGS_NONE);
+	assert(rc == EOK);
 	cp = (fat_cluster_t *)b->data + clst % (bps / sizeof(fat_cluster_t));
 	value = uint16_t_le2host(*cp);
-	block_put(b);
+	rc = block_put(b);
+	assert(rc == EOK);
 	
 	return value;
@@ -252,4 +265,5 @@
 	uint16_t sf;
 	fat_cluster_t *cp;
+	int rc;
 
 	bps = uint16_t_le2host(bs->bps);
@@ -258,10 +272,12 @@
 
 	assert(fatno < bs->fatcnt);
-	b = block_get(dev_handle, rscnt + sf * fatno +
+	rc = block_get(&b, dev_handle, rscnt + sf * fatno +
 	    (clst * sizeof(fat_cluster_t)) / bps, BLOCK_FLAGS_NONE);
+	assert(rc == EOK);
 	cp = (fat_cluster_t *)b->data + clst % (bps / sizeof(fat_cluster_t));
 	*cp = host2uint16_t_le(value);
 	b->dirty = true;		/* need to sync block */
-	block_put(b);
+	rc = block_put(b);
+	assert(rc == EOK);
 }
 
@@ -315,4 +331,5 @@
 	unsigned found = 0;	/* top of the free cluster number stack */
 	unsigned b, c, cl; 
+	int rc;
 
 	lifo = (fat_cluster_t *) malloc(nclsts * sizeof(fat_cluster_t));
@@ -329,5 +346,5 @@
 	fibril_mutex_lock(&fat_alloc_lock);
 	for (b = 0, cl = 0; b < sf; b++) {
-		blk = block_get(dev_handle, rscnt + b, BLOCK_FLAGS_NONE);
+		rc = block_get(&blk, dev_handle, rscnt + b, BLOCK_FLAGS_NONE);
 		for (c = 0; c < bps / sizeof(fat_cluster_t); c++, cl++) {
 			fat_cluster_t *clst = (fat_cluster_t *)blk->data + c;
@@ -344,5 +361,6 @@
 				if (++found == nclsts) {
 					/* we are almost done */
-					block_put(blk);
+					rc = block_put(blk);
+					assert(rc == EOK);
 					/* update the shadow copies of FAT */
 					fat_alloc_shadow_clusters(bs,
@@ -356,5 +374,6 @@
 			}
 		}
-		block_put(blk);
+		rc = block_put(blk);
+		assert(rc == EOK);
 	}
 	fibril_mutex_unlock(&fat_alloc_lock);
@@ -457,4 +476,5 @@
 	block_t *b;
 	unsigned bps;
+	int rc;
 
 	bps = uint16_t_le2host(bs->bps);
@@ -464,5 +484,6 @@
 		memset(b->data, 0, bps);
 		b->dirty = true;
-		block_put(b);
+		rc = block_put(b);
+		assert(rc == EOK);
 	}
 }
