shithub: lwext4

Download patch

ref: 5231ccdd1c9fdc7944118d8adb397ff87966e280
parent: 241ba2c8b4e76232dea9a44f3478ee6408ee41c1
author: root <ngkaho1234@gmail.com>
date: Sun Sep 20 18:48:48 EDT 2015

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

This reverts commit 241ba2c8b4e76232dea9a44f3478ee6408ee41c1.

--- 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(child,
+				rc = ext4_dir_dx_reset_parent_inode(parent,
 						parent->index);
 				if (rc != EOK)
 					return rc;
@@ -1218,25 +1218,6 @@
 	ext4_fs_put_inode_ref(&ref);
 	return r;
 
-}
-
-int ext4_fopen_all(ext4_file *f, const char *path, int flags)
-{
-	struct ext4_mountpoint *mp = ext4_get_mount(path);
-	int r;
-	int filetype;
-
-	if (!mp)
-		return ENOENT;
-
-	filetype = EXT4_DIRECTORY_FILETYPE_UNKNOWN;
-
-	EXT4_MP_LOCK(mp);
-	ext4_block_cache_write_back(mp->fs.bdev, 1);
-	r = ext4_generic_open2(f, path, flags, filetype, 0, 0);
-	ext4_block_cache_write_back(mp->fs.bdev, 0);
-	EXT4_MP_UNLOCK(mp);
-	return r;
 }
 
 int ext4_ftruncate(ext4_file *f, uint64_t size)