shithub: lwext4

Download patch

ref: eaafa053f9a6b8426ee16dbdee15954ae7d3eac9
parent: 5231ccdd1c9fdc7944118d8adb397ff87966e280
author: root <ngkaho1234@gmail.com>
date: Sun Sep 20 18:51:17 EDT 2015

FIX: the parent directory reference in child directory inode, a.k.a '..' dirent is not correctly reset during rename.

--- a/lwext4/ext4.c
+++ b/lwext4/ext4.c
@@ -253,7 +253,7 @@
 
 			} else {
 #if CONFIG_DIR_INDEX_ENABLE
-				rc = ext4_dir_dx_reset_parent_inode(parent,
+				rc = ext4_dir_dx_reset_parent_inode(child,
 						parent->index);
 				if (rc != EOK)
 					return rc;