Index: uspace/lib/ext4/libext4_balloc.c
===================================================================
--- uspace/lib/ext4/libext4_balloc.c	(revision 532f53d857141faeed0d784e254f4322c71ad472)
+++ uspace/lib/ext4/libext4_balloc.c	(revision e5a1ace31a3fced247ff6f421a3de1c6328973e8)
@@ -328,7 +328,5 @@
 	*goal = inode_table_first_block + inode_table_blocks;
 	
-	ext4_filesystem_put_block_group_ref(bg_ref);
-	
-	return EOK;
+	return ext4_filesystem_put_block_group_ref(bg_ref);
 }
 
@@ -469,6 +467,13 @@
 	
 	/* No free block found yet */
-	block_put(bitmap_block);
-	ext4_filesystem_put_block_group_ref(bg_ref);
+	rc = block_put(bitmap_block);
+	if (rc != EOK) {
+		ext4_filesystem_put_block_group_ref(bg_ref);
+		return rc;
+	}
+
+	rc = ext4_filesystem_put_block_group_ref(bg_ref);
+	if (rc != EOK)
+		return rc;
 	
 	/* Try other block groups */
@@ -540,6 +545,13 @@
 		}
 		
-		block_put(bitmap_block);
+		rc = block_put(bitmap_block);
+		if (rc != EOK) {
+			ext4_filesystem_put_block_group_ref(bg_ref);
+			return rc;
+		}
+
 		ext4_filesystem_put_block_group_ref(bg_ref);
+		if (rc != EOK)
+			return rc;
 		
 		/* Goto next group */
@@ -576,8 +588,8 @@
 	bg_ref->dirty = true;
 	
-	ext4_filesystem_put_block_group_ref(bg_ref);
+	rc = ext4_filesystem_put_block_group_ref(bg_ref);
 	
 	*fblock = allocated_block;
-	return EOK;
+	return rc;
 }
 
Index: uspace/lib/ext4/libext4_directory_index.c
===================================================================
--- uspace/lib/ext4/libext4_directory_index.c	(revision 532f53d857141faeed0d784e254f4322c71ad472)
+++ uspace/lib/ext4/libext4_directory_index.c	(revision e5a1ace31a3fced247ff6f421a3de1c6328973e8)
@@ -527,5 +527,7 @@
 		
 		/* Don't forget to put old block (prevent memory leak) */
-		block_put(p->block);
+		rc = block_put(p->block);
+		if (rc != EOK)
+			return rc;
 		
 		p->block = block;
@@ -553,4 +555,5 @@
 	/* Load direct block 0 (index root) */
 	uint32_t root_block_addr;
+	int rc2;
 	int rc = ext4_filesystem_get_inode_data_block_index(inode_ref, 0,
 	    &root_block_addr);
@@ -620,5 +623,7 @@
 		
 		/* Not found, leave untouched */
-		block_put(leaf_block);
+		rc2 = block_put(leaf_block);
+		if (rc2 != EOK)
+			goto cleanup;
 		
 		if (rc != ENOENT)
@@ -628,6 +633,7 @@
 		rc = ext4_directory_dx_next_block(inode_ref, hinfo.hash,
 		    dx_block, &dx_blocks[0]);
-		if (rc < 0)
+		if (rc != EOK)
 			goto cleanup;
+
 	} while (rc == ENOENT);
 	
@@ -640,5 +646,7 @@
 	
 	while (tmp <= dx_block) {
-		block_put(tmp->block);
+		rc2 = block_put(tmp->block);
+		if (rc == EOK && rc2 != EOK)
+			rc = rc2;
 		++tmp;
 	}
Index: uspace/lib/ext4/libext4_extent.c
===================================================================
--- uspace/lib/ext4/libext4_extent.c	(revision 532f53d857141faeed0d784e254f4322c71ad472)
+++ uspace/lib/ext4/libext4_extent.c	(revision e5a1ace31a3fced247ff6f421a3de1c6328973e8)
@@ -794,5 +794,9 @@
 			
 			/* Put back not modified old block */
-			block_put(path_ptr->block);
+			rc = block_put(path_ptr->block);
+			if (rc != EOK) {
+				ext4_balloc_free_block(inode_ref, fblock);
+				return rc;
+			}
 			
 			/* Initialize newly allocated block and remember it */
Index: uspace/lib/ext4/libext4_ialloc.c
===================================================================
--- uspace/lib/ext4/libext4_ialloc.c	(revision 532f53d857141faeed0d784e254f4322c71ad472)
+++ uspace/lib/ext4/libext4_ialloc.c	(revision e5a1ace31a3fced247ff6f421a3de1c6328973e8)
@@ -215,6 +215,14 @@
 			/* Block group has not any free i-node */
 			if (rc == ENOSPC) {
-				block_put(bitmap_block);
-				ext4_filesystem_put_block_group_ref(bg_ref);
+				rc = block_put(bitmap_block);
+				if (rc != EOK) {
+					ext4_filesystem_put_block_group_ref(bg_ref);
+					return rc;
+				}
+
+				rc = ext4_filesystem_put_block_group_ref(bg_ref);
+				if (rc != EOK)
+					return rc;
+
 				continue;
 			}
@@ -272,5 +280,8 @@
 		
 		/* Block group not modified, put it and jump to the next block group */
-		ext4_filesystem_put_block_group_ref(bg_ref);
+		rc = ext4_filesystem_put_block_group_ref(bg_ref);
+		if (rc != EOK)
+			return rc;
+
 		++bgid;
 	}
