Index: uspace/lib/ext4/libext4_extent.c
===================================================================
--- uspace/lib/ext4/libext4_extent.c	(revision 27644979c1153424ab3d385f930054e40aeae800)
+++ uspace/lib/ext4/libext4_extent.c	(revision 532f53d857141faeed0d784e254f4322c71ad472)
@@ -371,4 +371,5 @@
     uint32_t *fblock)
 {
+	int rc;
 	/* Compute bound defined by i-node size */
 	uint64_t inode_size =
@@ -400,8 +401,11 @@
 		uint64_t child = ext4_extent_index_get_leaf(index);
 		
-		if (block != NULL)
-			block_put(block);
-		
-		int rc = block_get(&block, inode_ref->fs->device, child,
+		if (block != NULL) {
+			rc = block_put(block);
+			if (rc != EOK)
+				return rc;
+		}
+		
+		rc = block_get(&block, inode_ref->fs->device, child,
 		    BLOCK_FLAGS_NONE);
 		if (rc != EOK)
@@ -429,7 +433,7 @@
 	/* Cleanup */
 	if (block != NULL)
-		block_put(block);
-	
-	return EOK;
+		rc = block_put(block);
+	
+	return rc;
 }
 
@@ -505,4 +509,8 @@
 	
 cleanup:
+	;
+
+	int rc2 = EOK;
+
 	/*
 	 * Put loaded blocks
@@ -510,6 +518,9 @@
 	 */
 	for (uint16_t i = 1; i < tmp_path->depth; ++i) {
-		if (tmp_path[i].block)
-			block_put(tmp_path[i].block);
+		if (tmp_path[i].block) {
+			rc2 = block_put(tmp_path[i].block);
+			if (rc == EOK && rc2 != EOK)
+				rc = rc2;
+		}
 	}
 	
@@ -594,7 +605,5 @@
 		return rc;
 	
-	ext4_balloc_free_block(inode_ref, fblock);
-	
-	return EOK;
+	return ext4_balloc_free_block(inode_ref, fblock);
 }
 
@@ -721,4 +730,8 @@
 	
 cleanup:
+	;
+
+	int rc2 = EOK;
+
 	/*
 	 * Put loaded blocks
@@ -726,6 +739,9 @@
 	 */
 	for (uint16_t i = 1; i <= path->depth; ++i) {
-		if (path[i].block)
-			block_put(path[i].block);
+		if (path[i].block) {
+			rc2 = block_put(path[i].block);
+			if (rc == EOK && rc2 != EOK)
+				rc = rc2;
+		}
 	}
 	
@@ -1061,4 +1077,8 @@
 	
 finish:
+	;
+
+	int rc2 = EOK;
+
 	/* Set return values */
 	*iblock = new_block_idx;
@@ -1070,6 +1090,9 @@
 	 */
 	for (uint16_t i = 1; i <= path->depth; ++i) {
-		if (path[i].block)
-			block_put(path[i].block);
+		if (path[i].block) {
+			rc2 = block_put(path[i].block);
+			if (rc == EOK && rc2 != EOK)
+				rc = rc2;
+		}
 	}
 	
Index: uspace/lib/ext4/libext4_filesystem.c
===================================================================
--- uspace/lib/ext4/libext4_filesystem.c	(revision 27644979c1153424ab3d385f930054e40aeae800)
+++ uspace/lib/ext4/libext4_filesystem.c	(revision 532f53d857141faeed0d784e254f4322c71ad472)
@@ -797,5 +797,8 @@
 		}
 		
-		block_put(block);
+		rc = block_put(block);
+		if (rc != EOK)
+			return rc;
+
 		rc = ext4_balloc_free_block(inode_ref, fblock);
 		if (rc != EOK)
@@ -841,5 +844,7 @@
 				}
 				
-				block_put(subblock);
+				rc = block_put(subblock);
+				if (rc != EOK)
+					return rc;
 			}
 			
@@ -851,5 +856,8 @@
 		}
 		
-		block_put(block);
+		rc = block_put(block);
+		if (rc != EOK)
+			return rc;
+
 		rc = ext4_balloc_free_block(inode_ref, fblock);
 		if (rc != EOK)
Index: uspace/srv/fs/ext4fs/ext4fs_ops.c
===================================================================
--- uspace/srv/fs/ext4fs/ext4fs_ops.c	(revision 27644979c1153424ab3d385f930054e40aeae800)
+++ uspace/srv/fs/ext4fs/ext4fs_ops.c	(revision 532f53d857141faeed0d784e254f4322c71ad472)
@@ -259,8 +259,12 @@
 	rc = ext4fs_node_get_core(rfn, eparent->instance, inode);
 	if (rc != EOK)
-		return rc;
-	
+		goto exit;
+
+exit:
+	;
+
 	/* Destroy search result structure */
-	return ext4_directory_destroy_result(&result);
+	int const rc2 = ext4_directory_destroy_result(&result);
+	return rc == EOK ? rc2 : rc;
 }
 
@@ -1002,7 +1006,5 @@
 	*lnkcnt = 1;
 	
-	ext4fs_node_put(root_node);
-	
-	return EOK;
+	return ext4fs_node_put(root_node);
 }
 
@@ -1093,7 +1095,7 @@
 	}
 	
-	ext4_filesystem_put_inode_ref(inode_ref);
-	
-	return rc;
+	int const rc2 = ext4_filesystem_put_inode_ref(inode_ref);
+	
+	return rc == EOK ? rc2 : rc;
 }
 
@@ -1268,9 +1270,9 @@
 		memset(buffer, 0, bytes);
 		
-		async_data_read_finalize(callid, buffer, bytes);
+		rc = async_data_read_finalize(callid, buffer, bytes);
 		*rbytes = bytes;
 		
 		free(buffer);
-		return EOK;
+		return rc;
 	}
 	
@@ -1284,5 +1286,9 @@
 	
 	assert(offset_in_block + bytes <= block_size);
-	async_data_read_finalize(callid, block->data + offset_in_block, bytes);
+	rc = async_data_read_finalize(callid, block->data + offset_in_block, bytes);
+	if (rc != EOK) {
+		block_put(block);
+		return rc;
+	}
 	
 	rc = block_put(block);
@@ -1316,7 +1322,7 @@
 	size_t len;
 	if (!async_data_write_receive(&callid, &len)) {
-		ext4fs_node_put(fn);
-		async_answer_0(callid, EINVAL);
-		return EINVAL;
+		rc = EINVAL;
+		async_answer_0(callid, rc);
+		goto exit;
 	}
 	
@@ -1341,7 +1347,6 @@
 	    &fblock);
 	if (rc != EOK) {
-		ext4fs_node_put(fn);
 		async_answer_0(callid, rc);
-		return rc;
+		goto exit;
 	}
 	
@@ -1359,7 +1364,6 @@
 				    &fblock, true);
 				if (rc != EOK) {
-					ext4fs_node_put(fn);
 					async_answer_0(callid, rc);
-					return rc;
+					goto exit;
 				}
 			}
@@ -1368,14 +1372,12 @@
 			    &fblock, false);
 			if (rc != EOK) {
-				ext4fs_node_put(fn);
 				async_answer_0(callid, rc);
-				return rc;
+				goto exit;
 			}
 		} else {
 			rc = ext4_balloc_alloc_block(inode_ref, &fblock);
 			if (rc != EOK) {
-				ext4fs_node_put(fn);
 				async_answer_0(callid, rc);
-				return rc;
+				goto exit;
 			}
 			
@@ -1384,7 +1386,6 @@
 			if (rc != EOK) {
 				ext4_balloc_free_block(inode_ref, fblock);
-				ext4fs_node_put(fn);
 				async_answer_0(callid, rc);
-				return rc;
+				goto exit;
 			}
 		}
@@ -1398,27 +1399,22 @@
 	rc = block_get(&write_block, service_id, fblock, flags);
 	if (rc != EOK) {
-		ext4fs_node_put(fn);
 		async_answer_0(callid, rc);
-		return rc;
+		goto exit;
 	}
 	
 	if (flags == BLOCK_FLAGS_NOREAD)
 		memset(write_block->data, 0, block_size);
-	
+
 	rc = async_data_write_finalize(callid, write_block->data +
 	    (pos % block_size), bytes);
-	if (rc != EOK) {
-		ext4fs_node_put(fn);
-		return rc;
-	}
-	
+	if (rc != EOK)
+		goto exit;
+
 	write_block->dirty = true;
 	
 	rc = block_put(write_block);
-	if (rc != EOK) {
-		ext4fs_node_put(fn);
-		return rc;
-	}
-	
+	if (rc != EOK)
+		goto exit;
+
 	/* Do some counting */
 	uint32_t old_inode_size = ext4_inode_get_size(fs->superblock,
@@ -1428,9 +1424,13 @@
 		inode_ref->dirty = true;
 	}
-	
+
 	*nsize = ext4_inode_get_size(fs->superblock, inode_ref->inode);
 	*wbytes = bytes;
-	
-	return ext4fs_node_put(fn);
+
+exit:
+	;
+
+	int const rc2 = ext4fs_node_put(fn);
+	return rc == EOK ? rc2 : rc;
 }
 
@@ -1458,7 +1458,7 @@
 	
 	rc = ext4_filesystem_truncate_inode(inode_ref, new_size);
-	ext4fs_node_put(fn);
-	
-	return rc;
+	int const rc2 = ext4fs_node_put(fn);
+	
+	return rc == EOK ? rc2 : rc;
 }
 
