diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp index 7c6b9acf8f..fef6d3b151 100644 --- a/Kernel/FileSystem/Inode.cpp +++ b/Kernel/FileSystem/Inode.cpp @@ -202,7 +202,7 @@ void Inode::set_metadata_dirty(bool metadata_dirty) } } -void Inode::did_add_child(InodeIdentifier, String const& name) +void Inode::did_add_child(InodeIdentifier, StringView name) { MutexLocker locker(m_inode_lock); @@ -211,7 +211,7 @@ void Inode::did_add_child(InodeIdentifier, String const& name) } } -void Inode::did_remove_child(InodeIdentifier, String const& name) +void Inode::did_remove_child(InodeIdentifier, StringView name) { MutexLocker locker(m_inode_lock); diff --git a/Kernel/FileSystem/Inode.h b/Kernel/FileSystem/Inode.h index a502b6dc8b..c773e488c6 100644 --- a/Kernel/FileSystem/Inode.h +++ b/Kernel/FileSystem/Inode.h @@ -106,8 +106,8 @@ protected: void set_metadata_dirty(bool); ErrorOr prepare_to_write_data(); - void did_add_child(InodeIdentifier child_id, String const& name); - void did_remove_child(InodeIdentifier child_id, String const& name); + void did_add_child(InodeIdentifier child_id, StringView); + void did_remove_child(InodeIdentifier child_id, StringView); void did_modify_contents(); void did_delete_self(); diff --git a/Kernel/FileSystem/InodeWatcher.cpp b/Kernel/FileSystem/InodeWatcher.cpp index d4bc588e3b..39bf92e360 100644 --- a/Kernel/FileSystem/InodeWatcher.cpp +++ b/Kernel/FileSystem/InodeWatcher.cpp @@ -86,7 +86,7 @@ ErrorOr> InodeWatcher::pseudo_path(const OpenFileDescript return KString::formatted("InodeWatcher:({})", m_wd_to_watches.size()); } -void InodeWatcher::notify_inode_event(Badge, InodeIdentifier inode_id, InodeWatcherEvent::Type event_type, String const& name) +void InodeWatcher::notify_inode_event(Badge, InodeIdentifier inode_id, InodeWatcherEvent::Type event_type, StringView name) { MutexLocker locker(m_lock); diff --git a/Kernel/FileSystem/InodeWatcher.h b/Kernel/FileSystem/InodeWatcher.h index 9c3bd0a809..f0ff959baf 100644 --- a/Kernel/FileSystem/InodeWatcher.h +++ b/Kernel/FileSystem/InodeWatcher.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -54,7 +55,7 @@ public: virtual StringView class_name() const override { return "InodeWatcher"sv; }; virtual bool is_inode_watcher() const override { return true; } - void notify_inode_event(Badge, InodeIdentifier, InodeWatcherEvent::Type, String const& name = {}); + void notify_inode_event(Badge, InodeIdentifier, InodeWatcherEvent::Type, StringView name = {}); ErrorOr register_inode(Inode&, unsigned event_mask); ErrorOr unregister_by_wd(int);