Index: uspace/lib/ext4/libext4_directory.c
===================================================================
--- uspace/lib/ext4/libext4_directory.c	(revision c30a0155d20e2d44c1d10feae9e7aa8c2a2b1b91)
+++ uspace/lib/ext4/libext4_directory.c	(revision 7689590c5b958af13470ce1a107cdcf2697d26b7)
@@ -345,6 +345,4 @@
 	// Linear algorithm
 
-	EXT4FS_DBG("Linear algorithm");
-
 	uint32_t iblock, fblock;
 	uint32_t block_size = ext4_superblock_get_block_size(fs->superblock);
@@ -354,4 +352,5 @@
 	uint32_t name_len = strlen(name);
 
+	// Find block, where is space for new entry
 	bool success = false;
 	for (iblock = 0; iblock < total_blocks; ++iblock) {
@@ -383,6 +382,5 @@
 	}
 
-
-	EXT4FS_DBG("NO FREE SPACE - needed to allocate block");
+	// No free block found - needed to allocate next block
 
 	rc = ext4_directory_append_block(fs, parent, &fblock, &iblock);
@@ -391,5 +389,5 @@
 	}
 
-	// Load block
+	// Load new block
 	block_t *new_block;
 	rc = block_get(&new_block, fs->device, fblock, BLOCK_FLAGS_NOREAD);
@@ -403,4 +401,5 @@
 	ext4_directory_write_entry(fs->superblock, block_entry, block_size, child, name, name_len);
 
+	// Save new block
 	new_block->dirty = true;
 	rc = block_put(new_block);
@@ -412,15 +411,16 @@
 }
 
-int ext4_directory_find_entry(ext4_directory_iterator_t *it,
-		ext4_inode_ref_t *parent, const char *name)
+int ext4_directory_find_entry(ext4_filesystem_t *fs,
+		ext4_directory_search_result_t *result, ext4_inode_ref_t *parent,
+		const char *name)
 {
 	int rc;
-	uint32_t name_size = strlen(name);
+	uint32_t name_len = strlen(name);
 
 	// Index search
-	if (ext4_superblock_has_feature_compatible(it->fs->superblock, EXT4_FEATURE_COMPAT_DIR_INDEX) &&
+	if (ext4_superblock_has_feature_compatible(fs->superblock, EXT4_FEATURE_COMPAT_DIR_INDEX) &&
 			ext4_inode_has_flag(parent->inode, EXT4_INODE_FLAG_INDEX)) {
 
-		rc = ext4_directory_dx_find_entry(it, it->fs, parent, name_size, name);
+		rc = ext4_directory_dx_find_entry(result, fs, parent, name_len, name);
 
 		// Check if index is not corrupted
@@ -434,35 +434,43 @@
 
 		EXT4FS_DBG("index is corrupted - doing linear search");
-
-	}
-
-	bool found = false;
-	// Linear search
-	while (it->current != NULL) {
-		uint32_t inode = ext4_directory_entry_ll_get_inode(it->current);
-
-		/* ignore empty directory entries */
-		if (inode != 0) {
-			uint16_t entry_name_size = ext4_directory_entry_ll_get_name_length(
-					it->fs->superblock, it->current);
-
-			if (entry_name_size == name_size && bcmp(name, it->current->name,
-				    name_size) == 0) {
-				found = true;
-				break;
-			}
-		}
-
-		rc = ext4_directory_iterator_next(it);
-		if (rc != EOK) {
-			return rc;
-		}
-	}
-
-	if (!found) {
-		return ENOENT;
-	}
-
-	return EOK;
+	}
+
+	uint32_t iblock, fblock;
+	uint32_t block_size = ext4_superblock_get_block_size(fs->superblock);
+	uint32_t inode_size = ext4_inode_get_size(fs->superblock, parent->inode);
+	uint32_t total_blocks = inode_size / block_size;
+
+	for (iblock = 0; iblock < total_blocks; ++iblock) {
+
+		rc = ext4_filesystem_get_inode_data_block_index(fs, parent->inode, iblock, &fblock);
+		if (rc != EOK) {
+			return rc;
+		}
+
+		block_t *block;
+		rc = block_get(&block, fs->device, fblock, BLOCK_FLAGS_NONE);
+		if (rc != EOK) {
+			return rc;
+		}
+
+		// find block entry
+		ext4_directory_entry_ll_t *res_entry;
+		rc = ext4_directory_find_in_block(block, fs->superblock, name_len, name, &res_entry);
+		if (rc == EOK) {
+			result->block = block;
+			result->dentry = res_entry;
+			return EOK;
+		}
+
+		rc = block_put(block);
+		if (rc != EOK) {
+			return rc;
+		}
+	}
+
+	result->block = NULL;
+	result->dentry =  NULL;
+
+	return ENOENT;
 }
 
@@ -478,25 +486,18 @@
 	}
 
-	ext4_directory_iterator_t it;
-	rc = ext4_directory_iterator_init(&it, fs, parent, 0);
+	ext4_directory_search_result_t result;
+	rc  = ext4_directory_find_entry(fs, &result, parent, name);
 	if (rc != EOK) {
 		return rc;
 	}
 
-	rc = ext4_directory_find_entry(&it, parent, name);
-	if (rc != EOK) {
-		ext4_directory_iterator_fini(&it);
-		return rc;
-	}
-
-	uint32_t block_size = ext4_superblock_get_block_size(fs->superblock);
-	uint32_t pos = it.current_offset % block_size;
-
-	ext4_directory_entry_ll_set_inode(it.current, 0);
-
+	ext4_directory_entry_ll_set_inode(result.dentry, 0);
+
+	uint32_t pos = (void *)result.dentry - result.block->data;
+
+	uint32_t offset = 0;
 	if (pos != 0) {
-		uint32_t offset = 0;
-
-		ext4_directory_entry_ll_t *tmp_dentry = it.current_block->data;
+
+		ext4_directory_entry_ll_t *tmp_dentry = result.block->data;
 		uint16_t tmp_dentry_length =
 				ext4_directory_entry_ll_get_entry_length(tmp_dentry);
@@ -504,5 +505,5 @@
 		while ((offset + tmp_dentry_length) < pos) {
 			offset += ext4_directory_entry_ll_get_entry_length(tmp_dentry);
-			tmp_dentry = it.current_block->data + offset;
+			tmp_dentry = result.block->data + offset;
 			tmp_dentry_length =
 					ext4_directory_entry_ll_get_entry_length(tmp_dentry);
@@ -512,5 +513,5 @@
 
 		uint16_t del_entry_length =
-				ext4_directory_entry_ll_get_entry_length(it.current);
+				ext4_directory_entry_ll_get_entry_length(result.dentry);
 		ext4_directory_entry_ll_set_entry_length(tmp_dentry,
 				tmp_dentry_length + del_entry_length);
@@ -518,10 +519,9 @@
 	}
 
-
-	it.current_block->dirty = true;
-
-	ext4_directory_iterator_fini(&it);
-	return EOK;
-}
+	result.block->dirty = true;
+
+	return ext4_directory_destroy_result(&result);
+}
+
 
 int ext4_directory_try_insert_entry(ext4_superblock_t *sb,
@@ -580,6 +580,51 @@
 }
 
+int ext4_directory_find_in_block(block_t *block,
+		ext4_superblock_t *sb, size_t name_len, const char *name,
+		ext4_directory_entry_ll_t **res_entry)
+{
+
+	ext4_directory_entry_ll_t *dentry = (ext4_directory_entry_ll_t *)block->data;
+	uint8_t *addr_limit = block->data + ext4_superblock_get_block_size(sb);
+
+	while ((uint8_t *)dentry < addr_limit) {
+
+		if ((uint8_t*) dentry + name_len > addr_limit) {
+			break;
+		}
+
+		if (dentry->inode != 0) {
+			if (name_len == ext4_directory_entry_ll_get_name_length(sb, dentry)) {
+				// Compare names
+				if (bcmp((uint8_t *)name, dentry->name, name_len) == 0) {
+					*res_entry = dentry;
+					return EOK;
+				}
+			}
+		}
+
+		// Goto next entry
+		uint16_t dentry_len = ext4_directory_entry_ll_get_entry_length(dentry);
+
+		if (dentry_len == 0) {
+			return EINVAL;
+		}
+
+		dentry = (ext4_directory_entry_ll_t *)((uint8_t *)dentry + dentry_len);
+	}
+
+	return ENOENT;
+}
+
+int ext4_directory_destroy_result(ext4_directory_search_result_t *result)
+{
+	if (result->block) {
+		return block_put(result->block);
+	}
+
+	return EOK;
+}
 
 /**
  * @}
- */ 
+ */
Index: uspace/lib/ext4/libext4_directory.h
===================================================================
--- uspace/lib/ext4/libext4_directory.h	(revision c30a0155d20e2d44c1d10feae9e7aa8c2a2b1b91)
+++ uspace/lib/ext4/libext4_directory.h	(revision 7689590c5b958af13470ce1a107cdcf2697d26b7)
@@ -70,4 +70,8 @@
 } ext4_directory_iterator_t;
 
+typedef struct ext4_directory_search_result {
+	block_t *block;
+	ext4_directory_entry_ll_t *dentry;
+} ext4_directory_search_result_t;
 
 extern uint32_t	ext4_directory_entry_ll_get_inode(ext4_directory_entry_ll_t *);
@@ -101,6 +105,6 @@
 extern int ext4_directory_add_entry(ext4_filesystem_t *, ext4_inode_ref_t *,
 		const char *, ext4_inode_ref_t *);
-extern int ext4_directory_find_entry(ext4_directory_iterator_t *,
-		ext4_inode_ref_t *, const char *);
+extern int ext4_directory_find_entry(ext4_filesystem_t *,
+		ext4_directory_search_result_t *, ext4_inode_ref_t *, const char *);
 extern int ext4_directory_remove_entry(ext4_filesystem_t* ,
 		ext4_inode_ref_t *, const char *);
@@ -108,4 +112,10 @@
 extern int ext4_directory_try_insert_entry(ext4_superblock_t *,
 		block_t *, ext4_inode_ref_t *, const char *, uint32_t);
+
+extern int ext4_directory_find_in_block(block_t *,
+		ext4_superblock_t *, size_t, const char *,
+		ext4_directory_entry_ll_t **);
+
+extern int ext4_directory_destroy_result(ext4_directory_search_result_t *);
 #endif
 
Index: uspace/lib/ext4/libext4_directory_index.c
===================================================================
--- uspace/lib/ext4/libext4_directory_index.c	(revision c30a0155d20e2d44c1d10feae9e7aa8c2a2b1b91)
+++ uspace/lib/ext4/libext4_directory_index.c	(revision 7689590c5b958af13470ce1a107cdcf2697d26b7)
@@ -264,46 +264,4 @@
 
 
-static int ext4_directory_dx_find_dir_entry(block_t *block,
-		ext4_superblock_t *sb, size_t name_len, const char *name,
-		ext4_directory_entry_ll_t **res_entry, aoff64_t *block_offset)
-{
-
-	aoff64_t offset = 0;
-	ext4_directory_entry_ll_t *dentry = (ext4_directory_entry_ll_t *)block->data;
-	uint8_t *addr_limit = block->data + ext4_superblock_get_block_size(sb);
-
-	while ((uint8_t *)dentry < addr_limit) {
-
-		if ((uint8_t*) dentry + name_len > addr_limit) {
-			break;
-		}
-
-		if (dentry->inode != 0) {
-			if (name_len == ext4_directory_entry_ll_get_name_length(sb, dentry)) {
-				// Compare names
-				if (bcmp((uint8_t *)name, dentry->name, name_len) == 0) {
-					*block_offset = offset;
-					*res_entry = dentry;
-					return 1;
-				}
-			}
-		}
-
-
-		// Goto next entry
-		uint16_t dentry_len = ext4_directory_entry_ll_get_entry_length(dentry);
-
-        if (dentry_len == 0) {
-        	// Error
-        	return -1;
-        }
-
-		offset += dentry_len;
-		dentry = (ext4_directory_entry_ll_t *)((uint8_t *)dentry + dentry_len);
-	}
-
-	return 0;
-}
-
 static int ext4_directory_dx_next_block(ext4_filesystem_t *fs, ext4_inode_t *inode, uint32_t hash,
 		ext4_directory_dx_block_t *handle, ext4_directory_dx_block_t *handles)
@@ -368,6 +326,6 @@
 }
 
-int ext4_directory_dx_find_entry(ext4_directory_iterator_t *it,
-		ext4_filesystem_t *fs, ext4_inode_ref_t *inode_ref, size_t len, const char *name)
+int ext4_directory_dx_find_entry(ext4_directory_search_result_t *result,
+		ext4_filesystem_t *fs, ext4_inode_ref_t *inode_ref, size_t name_len, const char *name)
 {
 	int rc;
@@ -383,10 +341,9 @@
 	rc = block_get(&root_block, fs->device, root_block_addr, BLOCK_FLAGS_NONE);
 	if (rc != EOK) {
-		it->current_block = NULL;
 		return rc;
 	}
 
 	ext4_hash_info_t hinfo;
-	rc = ext4_directory_hinfo_init(&hinfo, root_block, fs->superblock, len, name);
+	rc = ext4_directory_hinfo_init(&hinfo, root_block, fs->superblock, name_len, name);
 	if (rc != EOK) {
 		block_put(root_block);
@@ -419,16 +376,12 @@
 		}
 
-		aoff64_t block_offset;
 		ext4_directory_entry_ll_t *res_dentry;
-		rc = ext4_directory_dx_find_dir_entry(leaf_block, fs->superblock, len, name,
-				&res_dentry, &block_offset);
+		rc = ext4_directory_find_in_block(leaf_block, fs->superblock, name_len, name, &res_dentry);
+
 
 		// Found => return it
-		if (rc == 1) {
-			it->fs = fs;
-			it->inode_ref = inode_ref;
-			it->current_block = leaf_block;
-			it->current_offset = block_offset;
-			it->current = res_dentry;
+		if (rc == EOK) {
+			result->block = leaf_block;
+			result->dentry = res_dentry;
 			return EOK;
 		}
@@ -572,6 +525,4 @@
 	}
 
-//	EXT4FS_DBG("new block appended (iblock = \%u, fblock = \%u)", new_iblock, new_fblock);
-
 	// Load new block
 	block_t *new_data_block_tmp;
@@ -584,5 +535,4 @@
 
 	// Distribute entries to splitted blocks (by size)
-
 	uint32_t new_hash = 0;
 	uint32_t current_size = 0;
Index: uspace/lib/ext4/libext4_directory_index.h
===================================================================
--- uspace/lib/ext4/libext4_directory_index.h	(revision c30a0155d20e2d44c1d10feae9e7aa8c2a2b1b91)
+++ uspace/lib/ext4/libext4_directory_index.h	(revision 7689590c5b958af13470ce1a107cdcf2697d26b7)
@@ -123,5 +123,5 @@
 /*********************************************************************************/
 
-extern int ext4_directory_dx_find_entry(ext4_directory_iterator_t *,
+extern int ext4_directory_dx_find_entry(ext4_directory_search_result_t *,
 		ext4_filesystem_t *, ext4_inode_ref_t *, size_t, const char *);
 extern int ext4_directory_dx_add_entry(ext4_filesystem_t *,
Index: uspace/srv/fs/ext4fs/ext4fs_ops.c
===================================================================
--- uspace/srv/fs/ext4fs/ext4fs_ops.c	(revision c30a0155d20e2d44c1d10feae9e7aa8c2a2b1b91)
+++ uspace/srv/fs/ext4fs/ext4fs_ops.c	(revision 7689590c5b958af13470ce1a107cdcf2697d26b7)
@@ -210,14 +210,7 @@
 	}
 
-
-	ext4_directory_iterator_t it;
-	rc = ext4_directory_iterator_init(&it, fs, eparent->inode_ref, 0);
-	if (rc != EOK) {
-		return rc;
-	}
-
-	rc = ext4_directory_find_entry(&it, eparent->inode_ref, component);
-	if (rc != EOK) {
-		ext4_directory_iterator_fini(&it);
+	ext4_directory_search_result_t result;
+	rc = ext4_directory_find_entry(fs, &result, eparent->inode_ref, component);
+	if (rc != EOK) {
 		if (rc == ENOENT) {
 			*rfn = NULL;
@@ -227,13 +220,16 @@
 	}
 
-	uint32_t inode = ext4_directory_entry_ll_get_inode(it.current);
+	uint32_t inode = ext4_directory_entry_ll_get_inode(result.dentry);
 
 	rc = ext4fs_node_get_core(rfn, eparent->instance, inode);
 	if (rc != EOK) {
-		ext4_directory_iterator_fini(&it);
-		return rc;
-	}
-
-	ext4_directory_iterator_fini(&it);
+		return rc;
+	}
+
+	rc = ext4_directory_destroy_result(&result);
+	if (rc != EOK) {
+		return rc;
+	}
+
 	return EOK;
 }
