feat: fstat now handle symbolic link
[lunaix-os.git] / lunaix-os / kernel / fs / path_walk.c
index f3dc8dd1bae87941bc926b095c7c817eaf26c569..d376c798b778660328f07951257c6acfd9c537cd 100644 (file)
@@ -119,7 +119,7 @@ __vfs_walk(struct v_dnode* start,
         current_level = dnode;
         current_inode = current_level->inode;
 
-        if ((current_inode->itype & VFS_IFSYMLINK) &&
+        if ((current_inode->itype & F_MSLNK) &&
             !(walk_options & VFS_WALK_NOFOLLOW)) {
             const char* link;
 
@@ -148,8 +148,6 @@ __vfs_walk(struct v_dnode* start,
                 goto error;
             }
 
-            // reposition the resolved subtree pointed by symlink
-            // vfs_dcache_rehash(current_level->parent, dnode);
             current_level = dnode;
             current_inode = dnode->inode;
         }