Kernel: Convert Inode event APIs to use StringViews instead of Strings

These APIs allocate a copy internally anyways, so there's no point to
making another one for them.
This commit is contained in:
Idan Horowitz 2022-01-11 22:04:53 +02:00
commit e236f9d85a
Notes: sideshowbarker 2024-07-17 21:03:24 +09:00
4 changed files with 7 additions and 6 deletions

View file

@ -86,7 +86,7 @@ ErrorOr<NonnullOwnPtr<KString>> InodeWatcher::pseudo_path(const OpenFileDescript
return KString::formatted("InodeWatcher:({})", m_wd_to_watches.size());
}
void InodeWatcher::notify_inode_event(Badge<Inode>, InodeIdentifier inode_id, InodeWatcherEvent::Type event_type, String const& name)
void InodeWatcher::notify_inode_event(Badge<Inode>, InodeIdentifier inode_id, InodeWatcherEvent::Type event_type, StringView name)
{
MutexLocker locker(m_lock);