1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:05:06 +00:00

Kernel: Update the ".." inode for directories after a rename

Because the ".." entry in a directory is a separate inode, if a
directory is renamed to a new location, then we should update this entry
the point to the new parent directory as well.

Co-authored-by: Liav A <liavalb@gmail.com>
This commit is contained in:
sin-ack 2022-10-08 11:22:12 +02:00 committed by Andreas Kling
parent 2b246d980a
commit 3b03077abb
18 changed files with 128 additions and 0 deletions

View file

@ -36,6 +36,7 @@ private:
virtual ErrorOr<NonnullLockRefPtr<Inode>> create_child(StringView name, mode_t, dev_t, UserID, GroupID) override;
virtual ErrorOr<void> add_child(Inode& child, StringView name, mode_t) override;
virtual ErrorOr<void> remove_child(StringView name) override;
virtual ErrorOr<void> replace_child(StringView name, Inode& child) override;
virtual ErrorOr<void> update_timestamps(Optional<Time> atime, Optional<Time> ctime, Optional<Time> mtime) override;
virtual ErrorOr<void> increment_link_count() override;
virtual ErrorOr<void> decrement_link_count() override;