Index: uspace/srv/fs/fat/fat_fat.c
===================================================================
--- uspace/srv/fs/fat/fat_fat.c	(revision 5048be7c5783440cf587724dd25bdfeee3eb66f4)
+++ uspace/srv/fs/fat/fat_fat.c	(revision ff62c6d0bdc03c5f2a281a6fe8a6a8771b20b846)
@@ -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);
 	}
 }
Index: uspace/srv/fs/fat/fat_ops.c
===================================================================
--- uspace/srv/fs/fat/fat_ops.c	(revision 5048be7c5783440cf587724dd25bdfeee3eb66f4)
+++ uspace/srv/fs/fat/fat_ops.c	(revision ff62c6d0bdc03c5f2a281a6fe8a6a8771b20b846)
@@ -85,4 +85,5 @@
 	uint16_t bps;
 	unsigned dps;
+	int rc;
 	
 	assert(node->dirty);
@@ -108,5 +109,6 @@
 	
 	b->dirty = true;		/* need to sync block */
-	block_put(b);
+	rc = block_put(b);
+	assert(rc == EOK);
 }
 
@@ -170,4 +172,5 @@
 	unsigned spc;
 	unsigned dps;
+	int rc;
 
 	if (idxp->nodep) {
@@ -226,5 +229,6 @@
 	nodep->refcnt = 1;
 
-	block_put(b);
+	rc = block_put(b);
+	assert(rc == EOK);
 
 	/* Link the idx structure with the node structure. */
@@ -443,5 +447,6 @@
 			}
 		}
-		block_put(b);
+		rc = block_put(b);
+		assert(rc == EOK);
 	}
 	j = 0;
@@ -477,5 +482,6 @@
 	fat_dentry_name_set(d, name);
 	b->dirty = true;		/* need to sync block */
-	block_put(b);
+	rc = block_put(b);
+	assert(rc == EOK);
 	fibril_mutex_unlock(&parentp->idx->lock);
 
@@ -512,5 +518,6 @@
 	}
 	b->dirty = true;		/* need to sync block */
-	block_put(b);
+	rc = block_put(b);
+	assert(rc == EOK);
 
 	childp->idx->pfc = parentp->firstc;
@@ -539,4 +546,5 @@
 	uint16_t bps;
 	block_t *b;
+	int rc;
 
 	if (!parentp)
@@ -561,5 +569,6 @@
 	d->name[0] = FAT_DENTRY_ERASED;
 	b->dirty = true;		/* need to sync block */
-	block_put(b);
+	rc = block_put(b);
+	assert(rc == EOK);
 
 	/* remove the index structure from the position hash */
@@ -588,4 +597,5 @@
 	fat_dentry_t *d;
 	block_t *b;
+	int rc;
 
 	fibril_mutex_lock(&parentp->idx->lock);
@@ -603,5 +613,6 @@
 				continue;
 			case FAT_DENTRY_LAST:
-				block_put(b);
+				rc = block_put(b);
+				assert(rc == EOK);
 				fibril_mutex_unlock(&parentp->idx->lock);
 				return NULL;
@@ -629,14 +640,17 @@
 					 * run out of 32-bit indices.
 					 */
-					block_put(b);
+					rc = block_put(b);
+					assert(rc == EOK);
 					return NULL;
 				}
 				nodep = fat_node_get_core(idx);
 				fibril_mutex_unlock(&idx->lock);
-				block_put(b);
+				rc = block_put(b);
+				assert(rc == EOK);
 				return FS_NODE(nodep);
 			}
 		}
-		block_put(b);
+		rc = block_put(b);
+		assert(rc == EOK);
 	}
 
@@ -669,4 +683,5 @@
 	block_t *b;
 	unsigned i, j;
+	int rc;
 
 	if (nodep->type != FAT_DIRECTORY)
@@ -691,18 +706,22 @@
 				continue;
 			case FAT_DENTRY_LAST:
-				block_put(b);
+				rc = block_put(b);
+				assert(rc == EOK);
 				fibril_mutex_unlock(&nodep->idx->lock);
 				return false;
 			default:
 			case FAT_DENTRY_VALID:
-				block_put(b);
+				rc = block_put(b);
+				assert(rc == EOK);
 				fibril_mutex_unlock(&nodep->idx->lock);
 				return true;
 			}
-			block_put(b);
+			rc = block_put(b);
+			assert(rc == EOK);
 			fibril_mutex_unlock(&nodep->idx->lock);
 			return true;
 		}
-		block_put(b);
+		rc = block_put(b);
+		assert(rc == EOK);
 	}
 
@@ -901,4 +920,5 @@
 	size_t bytes;
 	block_t *b;
+	int rc;
 
 	if (!fn) {
@@ -937,5 +957,6 @@
 			(void) ipc_data_read_finalize(callid, b->data + pos % bps,
 			    bytes);
-			block_put(b);
+			rc = block_put(b);
+			assert(rc == EOK);
 		}
 	} else {
@@ -969,14 +990,17 @@
 					continue;
 				case FAT_DENTRY_LAST:
-					block_put(b);
+					rc = block_put(b);
+					assert(rc == EOK);
 					goto miss;
 				default:
 				case FAT_DENTRY_VALID:
 					fat_dentry_name_get(d, name);
-					block_put(b);
+					rc == block_put(b);
+					assert(rc == EOK);
 					goto hit;
 				}
 			}
-			block_put(b);
+			rc = block_put(b);
+			assert(rc == EOK);
 			bnum++;
 		}
@@ -1010,4 +1034,5 @@
 	off_t boundary;
 	int flags = BLOCK_FLAGS_NONE;
+	int rc;
 	
 	if (!fn) {
@@ -1055,5 +1080,6 @@
 		    bytes);
 		b->dirty = true;		/* need to sync block */
-		block_put(b);
+		rc = block_put(b);
+		assert(rc == EOK);
 		if (pos + bytes > nodep->size) {
 			nodep->size = pos + bytes;
@@ -1089,5 +1115,6 @@
 		    bytes);
 		b->dirty = true;		/* need to sync block */
-		block_put(b);
+		rc = block_put(b);
+		assert(rc == EOK);
 		/*
 		 * Append the cluster chain starting in mcl to the end of the
