diff options
Diffstat (limited to 'Kernel/FileSystem/InodeWatcher.cpp')
-rw-r--r-- | Kernel/FileSystem/InodeWatcher.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Kernel/FileSystem/InodeWatcher.cpp b/Kernel/FileSystem/InodeWatcher.cpp index e3563f599b..1d1ccebd08 100644 --- a/Kernel/FileSystem/InodeWatcher.cpp +++ b/Kernel/FileSystem/InodeWatcher.cpp @@ -24,13 +24,13 @@ InodeWatcher::~InodeWatcher() bool InodeWatcher::can_read(const OpenFileDescription&, u64) const { - MutexLocker locker(m_lock); + SpinlockLocker locker(m_lock); return !m_queue.is_empty(); } ErrorOr<size_t> InodeWatcher::read(OpenFileDescription&, u64, UserOrKernelBuffer& buffer, size_t buffer_size) { - MutexLocker locker(m_lock); + SpinlockLocker locker(m_lock); if (m_queue.is_empty()) // can_read will catch the blocking case. return EAGAIN; @@ -69,7 +69,7 @@ ErrorOr<size_t> InodeWatcher::read(OpenFileDescription&, u64, UserOrKernelBuffer ErrorOr<void> InodeWatcher::close() { - MutexLocker locker(m_lock); + SpinlockLocker locker(m_lock); for (auto& entry : m_wd_to_watches) { auto& inode = const_cast<Inode&>(entry.value->inode); @@ -88,7 +88,7 @@ ErrorOr<NonnullOwnPtr<KString>> InodeWatcher::pseudo_path(const OpenFileDescript void InodeWatcher::notify_inode_event(Badge<Inode>, InodeIdentifier inode_id, InodeWatcherEvent::Type event_type, StringView name) { - MutexLocker locker(m_lock); + SpinlockLocker locker(m_lock); auto it = m_inode_to_watches.find(inode_id); if (it == m_inode_to_watches.end()) @@ -107,7 +107,7 @@ void InodeWatcher::notify_inode_event(Badge<Inode>, InodeIdentifier inode_id, In ErrorOr<int> InodeWatcher::register_inode(Inode& inode, unsigned event_mask) { - MutexLocker locker(m_lock); + SpinlockLocker locker(m_lock); if (m_inode_to_watches.find(inode.identifier()) != m_inode_to_watches.end()) return EEXIST; @@ -142,7 +142,7 @@ ErrorOr<int> InodeWatcher::register_inode(Inode& inode, unsigned event_mask) ErrorOr<void> InodeWatcher::unregister_by_wd(int wd) { - MutexLocker locker(m_lock); + SpinlockLocker locker(m_lock); auto it = m_wd_to_watches.find(wd); if (it == m_wd_to_watches.end()) @@ -159,7 +159,7 @@ ErrorOr<void> InodeWatcher::unregister_by_wd(int wd) void InodeWatcher::unregister_by_inode(Badge<Inode>, InodeIdentifier identifier) { - MutexLocker locker(m_lock); + SpinlockLocker locker(m_lock); auto it = m_inode_to_watches.find(identifier); if (it == m_inode_to_watches.end()) |