Kernel/VFS: Don't explicitly remove "." and ".." entries

No behavior change intended.
This commit is contained in:
implicitfield
2024-12-02 00:31:13 +02:00
committed by Nico Weber
parent 0e94887b2c
commit 8ed7225810
4 changed files with 21 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ ErrorOr<void> Ext2FS::rename(Inode& old_parent_inode, StringView old_basename, I
auto old_inode = TRY(old_parent_inode.lookup(old_basename));
TRY(new_parent_inode.add_child(old_inode, new_basename, old_inode->mode()));
TRY(old_parent_inode.remove_child(old_basename));
TRY(static_cast<Ext2FSInode&>(old_parent_inode).remove_child_impl(old_basename, Ext2FSInode::RemoveDotEntries::No));
// If the inode that we moved is a directory and we changed parent
// directories, then we also have to make .. point to the new parent inode,