Revert "FIX: the parent directory reference in child directory inode, a.k.a '..'...
authorroot <ngkaho1234@gmail.com>
Sun, 20 Sep 2015 22:48:48 +0000 (22:48 +0000)
committerroot <ngkaho1234@gmail.com>
Sun, 20 Sep 2015 22:48:48 +0000 (22:48 +0000)
This reverts commit 241ba2c8b4e76232dea9a44f3478ee6408ee41c1.

lwext4/ext4.c

index 4b35858de58499fcb0505046e018881395dc2b8a..7ce8786f10f3ac8caced0e8de7bfdc878e67f1ad 100644 (file)
@@ -253,7 +253,7 @@ static int ext4_link(struct ext4_mountpoint *mp, struct ext4_inode_ref *parent,
 
                        } 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;
@@ -1220,25 +1220,6 @@ Finish:
 
 }
 
-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)
 {
        int r;