ref: 671468602df478307dd4586cd21d0511e8dc745e
parent: 64515529ee572ef975bd0bdc4f3aa804348df26d
author: gkostka <[email protected]>
date: Mon Nov 16 19:10:39 EST 2015
Move search result intit to begin of ext4_dir_find_entry
--- a/lwext4/ext4_dir.c
+++ b/lwext4/ext4_dir.c
@@ -452,6 +452,10 @@
{
struct ext4_sblock *sb = &parent->fs->sb;
+ /* Entry clear */
+ result->block.lb_id = 0;
+ result->dentry = NULL;
+
#if CONFIG_DIR_INDEX_ENABLE
/* Index search */
if ((ext4_sb_feature_com(sb, EXT4_FCOM_DIR_INDEX)) &&
@@ -524,11 +528,6 @@
if (rc != EOK)
return rc;
}
-
- /* Entry was not found */
-
- result->block.lb_id = 0;
- result->dentry = NULL;
return ENOENT;
}