summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/Inode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/FileSystem/Inode.cpp')
-rw-r--r--Kernel/FileSystem/Inode.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp
index 0072c8848b..9663656bd4 100644
--- a/Kernel/FileSystem/Inode.cpp
+++ b/Kernel/FileSystem/Inode.cpp
@@ -109,7 +109,7 @@ Inode::~Inode()
void Inode::will_be_destroyed()
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
if (m_metadata_dirty)
flush_metadata();
}
@@ -141,13 +141,13 @@ KResult Inode::decrement_link_count()
void Inode::set_shared_vmobject(SharedInodeVMObject& vmobject)
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
m_shared_vmobject = vmobject;
}
bool Inode::bind_socket(LocalSocket& socket)
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
if (m_socket)
return false;
m_socket = socket;
@@ -156,7 +156,7 @@ bool Inode::bind_socket(LocalSocket& socket)
bool Inode::unbind_socket()
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
if (!m_socket)
return false;
m_socket = nullptr;
@@ -165,21 +165,21 @@ bool Inode::unbind_socket()
void Inode::register_watcher(Badge<InodeWatcher>, InodeWatcher& watcher)
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
VERIFY(!m_watchers.contains(&watcher));
m_watchers.set(&watcher);
}
void Inode::unregister_watcher(Badge<InodeWatcher>, InodeWatcher& watcher)
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
VERIFY(m_watchers.contains(&watcher));
m_watchers.remove(&watcher);
}
NonnullRefPtr<FIFO> Inode::fifo()
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
VERIFY(metadata().is_fifo());
// FIXME: Release m_fifo when it is closed by all readers and writers
@@ -192,7 +192,7 @@ NonnullRefPtr<FIFO> Inode::fifo()
void Inode::set_metadata_dirty(bool metadata_dirty)
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
if (metadata_dirty) {
// Sanity check.
@@ -214,7 +214,7 @@ void Inode::set_metadata_dirty(bool metadata_dirty)
void Inode::did_add_child(InodeIdentifier const&, String const& name)
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
for (auto& watcher : m_watchers) {
watcher->notify_inode_event({}, identifier(), InodeWatcherEvent::Type::ChildCreated, name);
@@ -223,7 +223,7 @@ void Inode::did_add_child(InodeIdentifier const&, String const& name)
void Inode::did_remove_child(InodeIdentifier const&, String const& name)
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
if (name == "." || name == "..") {
// These are just aliases and are not interesting to userspace.
@@ -237,7 +237,7 @@ void Inode::did_remove_child(InodeIdentifier const&, String const& name)
void Inode::did_modify_contents()
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
for (auto& watcher : m_watchers) {
watcher->notify_inode_event({}, identifier(), InodeWatcherEvent::Type::ContentModified);
}
@@ -245,7 +245,7 @@ void Inode::did_modify_contents()
void Inode::did_delete_self()
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
for (auto& watcher : m_watchers) {
watcher->notify_inode_event({}, identifier(), InodeWatcherEvent::Type::Deleted);
}
@@ -255,7 +255,7 @@ KResult Inode::prepare_to_write_data()
{
// FIXME: It's a poor design that filesystems are expected to call this before writing out data.
// We should funnel everything through an interface at the VirtualFileSystem layer so this can happen from a single place.
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
if (fs().is_readonly())
return EROFS;
auto metadata = this->metadata();
@@ -268,7 +268,7 @@ KResult Inode::prepare_to_write_data()
RefPtr<SharedInodeVMObject> Inode::shared_vmobject() const
{
- Locker locker(m_inode_lock);
+ MutexLocker locker(m_inode_lock);
return m_shared_vmobject.strong_ref();
}