Index: uspace/srv/fs/minixfs/mfs.h
===================================================================
--- uspace/srv/fs/minixfs/mfs.h	(revision 1f1cc9d8567cc1bc036452b36c2d51293e16bde1)
+++ uspace/srv/fs/minixfs/mfs.h	(revision 152610a8c51c7ec86a4513453a916ae6f76fd311)
@@ -57,4 +57,6 @@
 
 GLOBAL fs_reg_t mfs_reg;
+
+typedef uint32_t bitchunk_t;
 
 typedef enum {
Index: uspace/srv/fs/minixfs/mfs_ops.c
===================================================================
--- uspace/srv/fs/minixfs/mfs_ops.c	(revision 1f1cc9d8567cc1bc036452b36c2d51293e16bde1)
+++ uspace/srv/fs/minixfs/mfs_ops.c	(revision 152610a8c51c7ec86a4513453a916ae6f76fd311)
@@ -438,5 +438,5 @@
 		if (!d_info) {
 			/*Reached the end of the dentries list*/
-			goto out;
+			break;
 		}
 
Index: uspace/srv/fs/minixfs/mfs_read.c
===================================================================
--- uspace/srv/fs/minixfs/mfs_read.c	(revision 1f1cc9d8567cc1bc036452b36c2d51293e16bde1)
+++ uspace/srv/fs/minixfs/mfs_read.c	(revision 152610a8c51c7ec86a4513453a916ae6f76fd311)
@@ -74,6 +74,6 @@
 	int r, nr_direct;
 	int ptrs_per_block;
-	uint32_t *bi1 = NULL;
-	uint32_t *bi2 = NULL;
+	block_t *bi1;
+	block_t *bi2;
 
 	assert(mnode);
@@ -83,5 +83,6 @@
 	assert(mnode->instance);
 
-	const struct mfs_sb_info *sbi = mnode->instance->sbi;
+	const struct mfs_instance *inst = mnode->instance;
+	const struct mfs_sb_info *sbi = inst->sbi;
 	assert(sbi);
 
@@ -111,14 +112,18 @@
 		}
 
-		bi1 = (uint32_t *) malloc(sbi->block_size);
-		r = read_ind_block(bi1, mnode->instance, ino_i->i_izone[0],
-					fs_version);
+		r = block_get(&bi1, inst->handle, ino_i->i_izone[0],
+				BLOCK_FLAGS_NONE);
+		if (r != EOK)
+			goto out;
 
-		if (fs_version == MFS_VERSION_V1)
-			*b = ((uint16_t *) bi1)[rblock];
-		else
-			*b = bi1[rblock];
+		if (fs_version == MFS_VERSION_V1) {
+			uint16_t tmp = ((uint16_t *) bi1->data)[rblock];
+			*b = conv16(sbi->native, tmp);
+	 	} else {
+			uint32_t tmp = ((uint32_t *) bi1->data)[rblock];
+			*b = conv32(sbi->native, tmp);
+		}
 
-		goto out;
+		goto out_put_1;
 	}
 
@@ -133,9 +138,6 @@
 	}
 
-	bi1 = (uint32_t *) malloc(sbi->block_size);
-	bi2 = (uint32_t *) malloc(sbi->block_size);
-
-	r = read_ind_block(bi1, mnode->instance, ino_i->i_izone[1],
-				fs_version);
+	r = block_get(&bi1, inst->handle, ino_i->i_izone[1],
+			BLOCK_FLAGS_NONE);
 
 	if (r != EOK)
@@ -150,27 +152,32 @@
 	/*read the second indirect zone of the chain*/
 	if (fs_version == MFS_VERSION_V1) {
-		r = read_ind_block(bi2, mnode->instance,
-			((uint16_t *) bi1)[di_block], fs_version);
+		uint16_t *pt16 = bi1->data;
+		uint16_t blk = conv16(sbi->native, pt16[di_block]);
+		r = block_get(&bi2, inst->handle, blk, BLOCK_FLAGS_NONE);
 
 		if (r != EOK)
-			goto out;
+			goto out_put_1;
 
-		*b = ((uint16_t *) bi2)[rblock % ptrs_per_block];
+		pt16 = bi2->data;
+		blk = conv16(sbi->native, pt16[di_block % ptrs_per_block]);
+		*b = blk;
 	} else {
-		r = read_ind_block(bi2, mnode->instance,
-			((uint32_t *) bi1)[di_block], fs_version);
+		uint32_t *pt32 = bi1->data;
+		uint32_t blk = conv32(sbi->native, pt32[di_block]);
+		r = block_get(&bi2, inst->handle, blk, BLOCK_FLAGS_NONE);
 
 		if (r != EOK)
-			goto out;
+			goto out_put_1;
 
-		*b = bi2[rblock % ptrs_per_block];
+		pt32 = bi2->data;
+		blk = conv32(sbi->native, pt32[di_block % ptrs_per_block]);
+		*b = blk;
 	}
 	r = EOK;
 
+	block_put(bi2);
+out_put_1:
+	block_put(bi1);
 out:
-	if (bi1)
-		free(bi1);
-	if (bi2)
-		free(bi2);
 	return r;
 }
Index: uspace/srv/fs/minixfs/mfs_utils.c
===================================================================
--- uspace/srv/fs/minixfs/mfs_utils.c	(revision 1f1cc9d8567cc1bc036452b36c2d51293e16bde1)
+++ uspace/srv/fs/minixfs/mfs_utils.c	(revision 152610a8c51c7ec86a4513453a916ae6f76fd311)
@@ -61,49 +61,4 @@
 }
 
-/*
- *Read an indirect block from disk and convert its
- *content to the native endian format.
- */
-int
-read_ind_block(void *data, struct mfs_instance *inst,
-			uint32_t block, mfs_version_t version)
-{
-	int rc;
-	unsigned i;
-	block_t *b;
-	uint32_t *ptr32;
-	uint16_t *ptr16;
-
-	assert(inst);
-	devmap_handle_t handle = inst->handle;
-	struct mfs_sb_info *sbi = inst->sbi;
-
-	assert(sbi);
-
-	rc = block_get(&b, handle, block, BLOCK_FLAGS_NONE);
-
-	if (rc != EOK)
-		goto out;
-
-	if (version == MFS_VERSION_V1) {
-		uint16_t *p = b->data;
-		ptr16 = data;
-		for (i = 0; i < sbi->block_size / sizeof(uint16_t); ++i)
-			ptr16[i] = conv16(sbi->native, p[i]);
-	} else {
-		uint32_t *p = b->data;
-		ptr32 = data;
-		for (i = 0; i < sbi->block_size / sizeof(uint32_t); ++i)
-			ptr32[i] = conv32(sbi->native, p[i]);
-
-	}
-
-	rc = EOK;
-
-out:
-	block_put(b);
-	return rc;
-}
-
 /**
  * @}
Index: uspace/srv/fs/minixfs/mfs_utils.h
===================================================================
--- uspace/srv/fs/minixfs/mfs_utils.h	(revision 1f1cc9d8567cc1bc036452b36c2d51293e16bde1)
+++ uspace/srv/fs/minixfs/mfs_utils.h	(revision 152610a8c51c7ec86a4513453a916ae6f76fd311)
@@ -47,8 +47,4 @@
 conv64(bool native, uint64_t n);
 
-extern int
-read_ind_block(void *data, struct mfs_instance *inst,
-		uint32_t block, mfs_version_t version);
-
 #endif
 
