Index: uspace/lib/ext4/libext4_balloc.c
===================================================================
--- uspace/lib/ext4/libext4_balloc.c	(revision cd5811208ccd95e385f6b35f6e2911be0581e464)
+++ uspace/lib/ext4/libext4_balloc.c	(revision 9104bb52fb95a82c4ca9099469079a13710b3044)
@@ -193,5 +193,5 @@
 	if (inode_block_count > 0) {
 		// TODO check retval
-		ext4_filesystem_get_inode_data_block_index(fs, inode_ref->inode, inode_block_count - 1, &goal);
+		ext4_filesystem_get_inode_data_block_index(fs, inode_ref, inode_block_count - 1, &goal);
 
 		// TODO
Index: uspace/lib/ext4/libext4_directory.c
===================================================================
--- uspace/lib/ext4/libext4_directory.c	(revision cd5811208ccd95e385f6b35f6e2911be0581e464)
+++ uspace/lib/ext4/libext4_directory.c	(revision 9104bb52fb95a82c4ca9099469079a13710b3044)
@@ -187,5 +187,5 @@
 		uint32_t next_block_phys_idx;
 		rc = ext4_filesystem_get_inode_data_block_index(it->fs,
-		    it->inode_ref->inode, next_block_idx, &next_block_phys_idx);
+		    it->inode_ref, next_block_idx, &next_block_phys_idx);
 		if (rc != EOK) {
 			return rc;
@@ -356,5 +356,5 @@
 	for (iblock = 0; iblock < total_blocks; ++iblock) {
 
-		rc = ext4_filesystem_get_inode_data_block_index(fs, parent->inode, iblock, &fblock);
+		rc = ext4_filesystem_get_inode_data_block_index(fs, parent, iblock, &fblock);
 		if (rc != EOK) {
 			return rc;
@@ -443,5 +443,5 @@
 	for (iblock = 0; iblock < total_blocks; ++iblock) {
 
-		rc = ext4_filesystem_get_inode_data_block_index(fs, parent->inode, iblock, &fblock);
+		rc = ext4_filesystem_get_inode_data_block_index(fs, parent, iblock, &fblock);
 		if (rc != EOK) {
 			return rc;
Index: uspace/lib/ext4/libext4_directory_index.c
===================================================================
--- uspace/lib/ext4/libext4_directory_index.c	(revision cd5811208ccd95e385f6b35f6e2911be0581e464)
+++ uspace/lib/ext4/libext4_directory_index.c	(revision 9104bb52fb95a82c4ca9099469079a13710b3044)
@@ -189,5 +189,5 @@
 
 static int ext4_directory_dx_get_leaf(ext4_hash_info_t *hinfo,
-		ext4_filesystem_t *fs, ext4_inode_t *inode, block_t *root_block,
+		ext4_filesystem_t *fs, ext4_inode_ref_t *inode_ref, block_t *root_block,
 		ext4_directory_dx_block_t **dx_block, ext4_directory_dx_block_t *dx_blocks)
 {
@@ -239,5 +239,5 @@
 
         uint32_t fblock;
-        rc = ext4_filesystem_get_inode_data_block_index(fs, inode, next_block, &fblock);
+        rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref, next_block, &fblock);
         if (rc != EOK) {
         	return rc;
@@ -270,5 +270,6 @@
 
 
-static int ext4_directory_dx_next_block(ext4_filesystem_t *fs, ext4_inode_t *inode, uint32_t hash,
+static int ext4_directory_dx_next_block(ext4_filesystem_t *fs,
+		ext4_inode_ref_t *inode_ref, uint32_t hash,
 		ext4_directory_dx_block_t *handle, ext4_directory_dx_block_t *handles)
 {
@@ -309,5 +310,5 @@
     	uint32_t block_idx = ext4_directory_dx_entry_get_block(p->position);
     	uint32_t block_addr;
-    	rc = ext4_filesystem_get_inode_data_block_index(fs, inode, block_idx, &block_addr);
+    	rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref, block_idx, &block_addr);
     	if (rc != EOK) {
     		return rc;
@@ -339,5 +340,5 @@
 	// get direct block 0 (index root)
 	uint32_t root_block_addr;
-	rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref->inode, 0, &root_block_addr);
+	rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref, 0, &root_block_addr);
 	if (rc != EOK) {
 		return rc;
@@ -360,5 +361,5 @@
 	ext4_directory_dx_block_t dx_blocks[2];
 	ext4_directory_dx_block_t *dx_block, *tmp;
-	rc = ext4_directory_dx_get_leaf(&hinfo, fs, inode_ref->inode, root_block, &dx_block, dx_blocks);
+	rc = ext4_directory_dx_get_leaf(&hinfo, fs, inode_ref, root_block, &dx_block, dx_blocks);
 	if (rc != EOK) {
 		block_put(root_block);
@@ -371,5 +372,5 @@
 		uint32_t leaf_block_idx = ext4_directory_dx_entry_get_block(dx_block->position);
 		uint32_t leaf_block_addr;
-    	rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref->inode, leaf_block_idx, &leaf_block_addr);
+    	rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref, leaf_block_idx, &leaf_block_addr);
     	if (rc != EOK) {
     		goto cleanup;
@@ -399,5 +400,5 @@
 		}
 
-		rc = ext4_directory_dx_next_block(fs, inode_ref->inode, hinfo.hash, dx_block, &dx_blocks[0]);
+		rc = ext4_directory_dx_next_block(fs, inode_ref, hinfo.hash, dx_block, &dx_blocks[0]);
 		if (rc < 0) {
 			goto cleanup;
@@ -747,5 +748,5 @@
 	// get direct block 0 (index root)
 	uint32_t root_block_addr;
-	rc = ext4_filesystem_get_inode_data_block_index(fs, parent->inode, 0, &root_block_addr);
+	rc = ext4_filesystem_get_inode_data_block_index(fs, parent, 0, &root_block_addr);
 	if (rc != EOK) {
 		return rc;
@@ -769,5 +770,5 @@
 	ext4_directory_dx_block_t dx_blocks[2];
 	ext4_directory_dx_block_t *dx_block, *dx_it;
-	rc = ext4_directory_dx_get_leaf(&hinfo, fs, parent->inode, root_block, &dx_block, dx_blocks);
+	rc = ext4_directory_dx_get_leaf(&hinfo, fs, parent, root_block, &dx_block, dx_blocks);
 	if (rc != EOK) {
 		rc = EXT4_ERR_BAD_DX_DIR;
@@ -779,5 +780,5 @@
 	uint32_t leaf_block_idx = ext4_directory_dx_entry_get_block(dx_block->position);
 	uint32_t leaf_block_addr;
-   	rc = ext4_filesystem_get_inode_data_block_index(fs, parent->inode, leaf_block_idx, &leaf_block_addr);
+   	rc = ext4_filesystem_get_inode_data_block_index(fs, parent, leaf_block_idx, &leaf_block_addr);
    	if (rc != EOK) {
    		goto release_index;
Index: uspace/lib/ext4/libext4_extent.c
===================================================================
--- uspace/lib/ext4/libext4_extent.c	(revision cd5811208ccd95e385f6b35f6e2911be0581e464)
+++ uspace/lib/ext4/libext4_extent.c	(revision 9104bb52fb95a82c4ca9099469079a13710b3044)
@@ -149,120 +149,213 @@
 }
 
-static void ext4_extent_binsearch_idx(ext4_extent_path_t *path, uint32_t iblock)
-{
-	ext4_extent_header_t *header = path->header;
-	ext4_extent_index_t *r, *l, *m;
-
-	uint16_t entries_count = ext4_extent_header_get_entries_count(header);
-	l = EXT4_EXTENT_FIRST_INDEX(header) + 1;
-	r = l + entries_count - 1;
-
-	while (l <= r) {
-		m = l + (r - l) / 2;
-		uint32_t block = ext4_extent_index_get_first_block(m);
-		if (iblock < block) {
-				r = m - 1;
-		} else {
-				l = m + 1;
+//static void ext4_extent_binsearch_idx(ext4_extent_path_t *path, uint32_t iblock)
+//{
+//	ext4_extent_header_t *header = path->header;
+//	ext4_extent_index_t *r, *l, *m;
+//
+//	uint16_t entries_count = ext4_extent_header_get_entries_count(header);
+//	l = EXT4_EXTENT_FIRST_INDEX(header) + 1;
+//	r = l + entries_count - 1;
+//
+//	while (l <= r) {
+//		m = l + (r - l) / 2;
+//		uint32_t block = ext4_extent_index_get_first_block(m);
+//		if (iblock < block) {
+//				r = m - 1;
+//		} else {
+//				l = m + 1;
+//		}
+//	}
+//
+//	path->index = l - 1;
+//}
+//
+//static void ext4_extent_binsearch(ext4_extent_path_t *path, uint32_t iblock)
+//{
+//	ext4_extent_header_t *header = path->header;
+//	ext4_extent_t *r, *l, *m;
+//
+//	uint16_t entries_count = ext4_extent_header_get_entries_count(header);
+//
+//	if (entries_count == 0) {
+//		// this leaf is empty
+//		return;
+//	}
+//
+//	l = EXT4_EXTENT_FIRST(header) + 1;
+//	r = l + entries_count - 1;
+//
+//	while (l <= r) {
+//		m = l + (r - l) / 2;
+//		uint32_t block = ext4_extent_get_first_block(m);
+//		if (iblock < block) {
+//				r = m - 1;
+//		} else {
+//				l = m + 1;
+//		}
+//	}
+//
+//	path->extent = l - 1;
+//
+//}
+
+static int ext4_extent_find_extent(ext4_filesystem_t *fs, ext4_inode_ref_t *inode_ref, uint32_t iblock, ext4_extent_t **ret_extent)
+{
+	int rc;
+
+	block_t* block = NULL;
+
+	ext4_extent_header_t *header = ext4_inode_get_extent_header(inode_ref->inode);
+	while (ext4_extent_header_get_depth(header) != 0) {
+
+		ext4_extent_index_t *extent_index = EXT4_EXTENT_FIRST_INDEX(header);
+
+		for (uint16_t i = 0; i < ext4_extent_header_get_entries_count(header); ++i) {
+			if (iblock >= ext4_extent_index_get_first_block(extent_index)) {
+
+				uint64_t child = ext4_extent_index_get_leaf(extent_index);
+
+				if (block != NULL) {
+					block_put(block);
+				}
+
+				rc = block_get(&block, fs->device, child, BLOCK_FLAGS_NONE);
+				if (rc != EOK) {
+					return rc;
+				}
+
+				header = (ext4_extent_header_t *)block->data;
+				break;
+			}
 		}
 	}
 
-	path->index = l - 1;
-}
-
-static void ext4_extent_binsearch(ext4_extent_path_t *path, uint32_t iblock)
-{
-	ext4_extent_header_t *header = path->header;
-	ext4_extent_t *r, *l, *m;
-
-	uint16_t entries_count = ext4_extent_header_get_entries_count(header);
-
-	if (entries_count == 0) {
-		// this leaf is empty
-		return;
+	ext4_extent_t *extent = EXT4_EXTENT_FIRST(header);
+//	uint64_t phys_block = 0;
+
+	for (uint16_t i = 0; i < ext4_extent_header_get_entries_count(header); ++i) {
+
+		uint32_t first_block = ext4_extent_get_first_block(extent);
+		uint16_t block_count = ext4_extent_get_block_count(extent);
+
+		if ((iblock >= first_block) && (iblock < first_block + block_count)) {
+			break;
+		}
+		// Go to the next extent
+		++extent;
 	}
 
-	l = EXT4_EXTENT_FIRST(header) + 1;
-	r = l + entries_count - 1;
-
-	while (l <= r) {
-		m = l + (r - l) / 2;
-		uint32_t block = ext4_extent_get_first_block(m);
-		if (iblock < block) {
-				r = m - 1;
-		} else {
-				l = m + 1;
-		}
+	*ret_extent = extent;
+
+	return EOK;
+}
+
+int ext4_extent_find_block(ext4_filesystem_t *fs,
+		ext4_inode_ref_t *inode_ref, uint32_t iblock, uint32_t *fblock)
+{
+	int rc;
+
+	ext4_extent_t *extent = NULL;
+	rc = ext4_extent_find_extent(fs, inode_ref, iblock, &extent);
+	if (rc != EOK) {
+		return rc;
 	}
 
-	path->extent = l - 1;
-
-}
-
-int ext4_extent_find_block(ext4_filesystem_t *fs, ext4_extent_path_t **path,
-		ext4_extent_header_t *header, uint32_t iblock)
-{
-	int rc;
-
-	uint16_t depth = ext4_extent_header_get_depth(header);
-
-	ext4_extent_header_t *eh = header;
-
-	ext4_extent_path_t *tmp_path;
-
-	// Added 2 for possible tree growing
-	tmp_path = malloc(sizeof(ext4_extent_path_t) * (depth + 2));
-	if (tmp_path == NULL) {
-		*path = NULL;
-		return ENOMEM;
-	}
-
-	tmp_path[0].block = NULL;
-	tmp_path[0].header = eh;
-
-	uint16_t pos = 0, idx = depth;
-	while (idx > 0) {
-
-		ext4_extent_binsearch_idx(tmp_path + pos, iblock);
-
-		tmp_path[pos].depth = idx;
-		tmp_path[pos].extent = NULL;
-
-		uint64_t fblock = ext4_extent_index_get_leaf(tmp_path[pos].index);
-		block_t *block;
-		rc = block_get(&block, fs->device, fblock, BLOCK_FLAGS_NONE);
-		if (rc != EOK) {
-			// TODO cleanup
-		}
-
-		eh = (ext4_extent_header_t *)tmp_path[pos].block->data;
-		pos++;
-
-		tmp_path[pos].block = block;
-		tmp_path[pos].header = eh;
-
-		idx--;
-
-	}
-
-	tmp_path[pos].depth = idx;
-	tmp_path[pos].extent = NULL;
-	tmp_path[pos].index = NULL;
-
-    /* find extent */
-	ext4_extent_binsearch(tmp_path + pos, iblock);
-
-	/* if not an empty leaf */
-	if (tmp_path[pos].extent) {
-		uint64_t fblock = ext4_extent_get_start(tmp_path[pos].extent);
-		block_t *block;
-		rc = block_get(&block, fs->device, fblock, BLOCK_FLAGS_NONE);
-		if (rc != EOK) {
-			// TODO cleanup
-		}
-		tmp_path[pos].block = block;
-	}
+	uint32_t phys_block;
+	phys_block = ext4_extent_get_start(extent) + iblock;
+	phys_block -= ext4_extent_get_first_block(extent);
+
+
+	*fblock = phys_block;
 
 	return EOK;
+
+
+//	ext4_extent_header_t *eh =
+//			ext4_inode_get_extent_header(inode_ref->inode);
+//
+//	uint16_t depth = ext4_extent_header_get_depth(eh);
+//
+//	ext4_extent_path_t *tmp_path;
+//
+//	// Added 2 for possible tree growing
+//	tmp_path = malloc(sizeof(ext4_extent_path_t) * (depth + 2));
+//	if (tmp_path == NULL) {
+//		*path = NULL;
+//		return ENOMEM;
+//	}
+//
+//	tmp_path[0].block = inode_ref->block;
+//	tmp_path[0].header = eh;
+//
+//	uint16_t pos = 0;
+//	while (ext4_extent_header_get_depth(eh) != 0) {
+//
+//		EXT4FS_DBG("count == \%u", ext4_extent_header_get_entries_count(eh));
+//
+//		ext4_extent_binsearch_idx(tmp_path + pos, iblock);
+//
+//		uint32_t offset = (void *)tmp_path[pos].index - (void *)EXT4_EXTENT_FIRST_INDEX(eh);
+//
+//		EXT4FS_DBG("offset = \%u", offset);
+//
+//		EXT4FS_DBG("first block = \%u, leaf = \%u",
+//				ext4_extent_index_get_first_block(tmp_path[pos].index),
+//				(uint32_t)ext4_extent_index_get_leaf(tmp_path[pos].index));
+//
+//		tmp_path[pos].depth = depth;
+//		tmp_path[pos].extent = NULL;
+//
+//		assert(tmp_path[pos].index != NULL);
+//
+//		uint64_t fblock = ext4_extent_index_get_leaf(tmp_path[pos].index);
+//
+//		EXT4FS_DBG("fblock = \%u", (uint32_t)fblock);
+//
+//		block_t *block;
+//		rc = block_get(&block, fs->device, fblock, BLOCK_FLAGS_NONE);
+//		if (rc != EOK) {
+//			// TODO cleanup
+//			EXT4FS_DBG("ERRRR");
+//			return rc;
+//		}
+//
+//		EXT4FS_DBG("block loaded");
+//
+//		pos++;
+//
+//		eh = (ext4_extent_header_t *)block->data;
+//		tmp_path[pos].block = block;
+//		tmp_path[pos].header = eh;
+//
+//	}
+//
+//	tmp_path[pos].depth = 0;
+//	tmp_path[pos].extent = NULL;
+//	tmp_path[pos].index = NULL;
+//
+//	EXT4FS_DBG("pos = \%u", pos);
+//
+//    /* find extent */
+//	ext4_extent_binsearch(tmp_path + pos, iblock);
+//
+//	EXT4FS_DBG("after binsearch in extent");
+//
+//	/* if not an empty leaf */
+//	if (tmp_path[pos].extent) {
+//		EXT4FS_DBG("nonempty leaf");
+//
+////		uint64_t fblock = ext4_extent_get_start(tmp_path[pos].extent);
+////		block_t *block;
+////		rc = block_get(&block, fs->device, fblock, BLOCK_FLAGS_NONE);
+////		if (rc != EOK) {
+////			// TODO cleanup
+////		}
+////		tmp_path[pos].block = block;
+//	}
+//
+//	*path = tmp_path;
+//
+//	return EOK;
 }
 
Index: uspace/lib/ext4/libext4_extent.h
===================================================================
--- uspace/lib/ext4/libext4_extent.h	(revision cd5811208ccd95e385f6b35f6e2911be0581e464)
+++ uspace/lib/ext4/libext4_extent.h	(revision 9104bb52fb95a82c4ca9099469079a13710b3044)
@@ -61,6 +61,6 @@
 extern void ext4_extent_header_set_generation(ext4_extent_header_t *, uint32_t);
 
-extern int ext4_extent_find_block(ext4_filesystem_t *, ext4_extent_path_t **,
-		ext4_extent_header_t *, uint32_t);
+extern int ext4_extent_find_block(ext4_filesystem_t *, ext4_inode_ref_t *,
+		uint32_t, uint32_t *);
 #endif
 
Index: uspace/lib/ext4/libext4_filesystem.c
===================================================================
--- uspace/lib/ext4/libext4_filesystem.c	(revision cd5811208ccd95e385f6b35f6e2911be0581e464)
+++ uspace/lib/ext4/libext4_filesystem.c	(revision 9104bb52fb95a82c4ca9099469079a13710b3044)
@@ -494,6 +494,6 @@
 }
 
-int ext4_filesystem_get_inode_data_block_index(ext4_filesystem_t *fs, ext4_inode_t* inode,
-    aoff64_t iblock, uint32_t* fblock)
+int ext4_filesystem_get_inode_data_block_index(ext4_filesystem_t *fs,
+		ext4_inode_ref_t *inode_ref, aoff64_t iblock, uint32_t* fblock)
 {
 	int rc;
@@ -504,10 +504,17 @@
 	/* Handle inode using extents */
 	if (ext4_superblock_has_feature_incompatible(fs->superblock, EXT4_FEATURE_INCOMPAT_EXTENTS) &&
-			ext4_inode_has_flag(inode, EXT4_INODE_FLAG_EXTENTS)) {
-		current_block = ext4_inode_get_extent_block(inode, iblock, fs->device);
+			ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_EXTENTS)) {
+		rc = ext4_extent_find_block(fs, inode_ref, iblock, &current_block);
+
+		if (rc != EOK) {
+			return rc;
+		}
+
 		*fblock = current_block;
 		return EOK;
 
 	}
+
+	ext4_inode_t *inode = inode_ref->inode;
 
 	/* Handle simple case when we are dealing with direct reference */
Index: uspace/lib/ext4/libext4_filesystem.h
===================================================================
--- uspace/lib/ext4/libext4_filesystem.h	(revision cd5811208ccd95e385f6b35f6e2911be0581e464)
+++ uspace/lib/ext4/libext4_filesystem.h	(revision 9104bb52fb95a82c4ca9099469079a13710b3044)
@@ -53,5 +53,5 @@
 		ext4_inode_ref_t *, aoff64_t);
 extern int ext4_filesystem_get_inode_data_block_index(ext4_filesystem_t *,
-	ext4_inode_t *, aoff64_t iblock, uint32_t *);
+	ext4_inode_ref_t *, aoff64_t iblock, uint32_t *);
 extern int ext4_filesystem_set_inode_data_block_index(ext4_filesystem_t *,
 		ext4_inode_ref_t *, aoff64_t, uint32_t);
Index: uspace/lib/ext4/libext4_inode.c
===================================================================
--- uspace/lib/ext4/libext4_inode.c	(revision cd5811208ccd95e385f6b35f6e2911be0581e464)
+++ uspace/lib/ext4/libext4_inode.c	(revision 9104bb52fb95a82c4ca9099469079a13710b3044)
@@ -278,63 +278,4 @@
 }
 
-
-uint32_t ext4_inode_get_extent_block(ext4_inode_t *inode, uint64_t idx, service_id_t service_id)
-{
-	int rc;
-
-	block_t* block = NULL;
-
-	ext4_extent_header_t *header = ext4_inode_get_extent_header(inode);
-	while (ext4_extent_header_get_depth(header) != 0) {
-
-		ext4_extent_index_t *extent_index = EXT4_EXTENT_FIRST_INDEX(header);
-
-		for (uint16_t i = 0; i < ext4_extent_header_get_entries_count(header); ++i) {
-			if (idx >= ext4_extent_index_get_first_block(extent_index)) {
-
-				uint64_t child = ext4_extent_index_get_leaf(extent_index);
-
-				if (block != NULL) {
-					block_put(block);
-				}
-
-				rc = block_get(&block, service_id, child, BLOCK_FLAGS_NONE);
-				if (rc != EOK) {
-					return 0;
-				}
-
-				header = (ext4_extent_header_t *)block->data;
-				break;
-			}
-		}
-	}
-
-	ext4_extent_t *extent = EXT4_EXTENT_FIRST(header);
-	uint64_t phys_block = 0;
-
-	for (uint16_t i = 0; i < ext4_extent_header_get_entries_count(header); ++i) {
-
-		uint32_t first_block = ext4_extent_get_first_block(extent);
-		uint16_t block_count = ext4_extent_get_block_count(extent);
-
-		if ((idx >= first_block) && (idx < first_block + block_count)) {
-			 phys_block = ext4_extent_get_start(extent) + idx;
-			 phys_block -= ext4_extent_get_first_block(extent);
-
-			 // Memory leak prevention
-			 if (block != NULL) {
-				 block_put(block);
-			 }
-			 return phys_block;
-		}
-		// Go to the next extent
-		++extent;
-	}
-
-
-	EXT4FS_DBG("ERROR - reached function end");
-	return phys_block;
-}
-
 bool ext4_inode_is_type(ext4_superblock_t *sb, ext4_inode_t *inode, uint32_t type)
 {
Index: uspace/lib/ext4/libext4_inode.h
===================================================================
--- uspace/lib/ext4/libext4_inode.h	(revision cd5811208ccd95e385f6b35f6e2911be0581e464)
+++ uspace/lib/ext4/libext4_inode.h	(revision 9104bb52fb95a82c4ca9099469079a13710b3044)
@@ -80,5 +80,4 @@
 extern uint32_t ext4_inode_get_indirect_block(ext4_inode_t *, uint32_t);
 extern void ext4_inode_set_indirect_block(ext4_inode_t *, uint32_t, uint32_t);
-extern uint32_t ext4_inode_get_extent_block(ext4_inode_t *, uint64_t, service_id_t);
 extern ext4_extent_header_t * ext4_inode_get_extent_header(ext4_inode_t *);
 extern bool ext4_inode_is_type(ext4_superblock_t *, ext4_inode_t *, uint32_t);
Index: uspace/srv/fs/ext4fs/ext4fs_ops.c
===================================================================
--- uspace/srv/fs/ext4fs/ext4fs_ops.c	(revision cd5811208ccd95e385f6b35f6e2911be0581e464)
+++ uspace/srv/fs/ext4fs/ext4fs_ops.c	(revision 9104bb52fb95a82c4ca9099469079a13710b3044)
@@ -1003,5 +1003,5 @@
 	uint32_t fs_block;
 	rc = ext4_filesystem_get_inode_data_block_index(inst->filesystem,
-		inode_ref->inode, file_block, &fs_block);
+		inode_ref, file_block, &fs_block);
 	if (rc != EOK) {
 		async_answer_0(callid, rc);
@@ -1090,5 +1090,5 @@
 
 	ext4_inode_ref_t *inode_ref = enode->inode_ref;
-	rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref->inode, iblock, &fblock);
+	rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref, iblock, &fblock);
 	if (rc != EOK) {
 		ext4fs_node_put(fn);
