From 3b805a57e6bbf5ebdda5e5622d407996ed51beaf Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 17 Jul 2021 21:17:39 +0200 Subject: Kernel: Rename Inode::m_lock => m_inode_lock This makes file system code much easier to read since it was hard when both the file system and inode locks were called "m_lock". --- Kernel/FileSystem/DevFS.cpp | 28 ++++++++++++------------ Kernel/FileSystem/Ext2FileSystem.cpp | 40 +++++++++++++++++------------------ Kernel/FileSystem/Inode.cpp | 28 ++++++++++++------------ Kernel/FileSystem/Inode.h | 2 +- Kernel/FileSystem/Plan9FileSystem.cpp | 2 +- Kernel/FileSystem/ProcFS.cpp | 8 +++---- Kernel/FileSystem/SysFS.cpp | 6 +++--- Kernel/FileSystem/TmpFS.cpp | 30 +++++++++++++------------- 8 files changed, 72 insertions(+), 72 deletions(-) (limited to 'Kernel') diff --git a/Kernel/FileSystem/DevFS.cpp b/Kernel/FileSystem/DevFS.cpp index 1236b72445..3a353f1dad 100644 --- a/Kernel/FileSystem/DevFS.cpp +++ b/Kernel/FileSystem/DevFS.cpp @@ -153,7 +153,7 @@ DevFSLinkInode::DevFSLinkInode(DevFS& fs, String name) } KResultOr DevFSLinkInode::read_bytes(off_t offset, size_t, UserOrKernelBuffer& buffer, FileDescription*) const { - Locker locker(m_lock); + Locker locker(m_inode_lock); VERIFY(offset == 0); VERIFY(!m_link.is_null()); if (!buffer.write(((const u8*)m_link.substring_view(0).characters_without_null_termination()) + offset, m_link.length())) @@ -162,7 +162,7 @@ KResultOr DevFSLinkInode::read_bytes(off_t offset, size_t, UserOrKernelB } InodeMetadata DevFSLinkInode::metadata() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); InodeMetadata metadata; metadata.inode = { fsid(), index() }; metadata.mode = S_IFLNK | 0555; @@ -174,7 +174,7 @@ InodeMetadata DevFSLinkInode::metadata() const } KResultOr DevFSLinkInode::write_bytes(off_t offset, size_t count, const UserOrKernelBuffer& buffer, FileDescription*) { - Locker locker(m_lock); + Locker locker(m_inode_lock); VERIFY(offset == 0); VERIFY(buffer.is_kernel_buffer()); m_link = buffer.copy_into_string(count); @@ -190,7 +190,7 @@ DevFSDirectoryInode::~DevFSDirectoryInode() } InodeMetadata DevFSDirectoryInode::metadata() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); InodeMetadata metadata; metadata.inode = { fsid(), 1 }; metadata.mode = 0040555; @@ -202,17 +202,17 @@ InodeMetadata DevFSDirectoryInode::metadata() const } KResult DevFSDirectoryInode::traverse_as_directory(Function) const { - Locker locker(m_lock); + Locker locker(m_inode_lock); return EINVAL; } RefPtr DevFSDirectoryInode::lookup(StringView) { - Locker locker(m_lock); + Locker locker(m_inode_lock); return nullptr; } KResultOr DevFSDirectoryInode::directory_entry_count() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); return m_devices.size(); } @@ -335,7 +335,7 @@ DevFSDeviceInode::~DevFSDeviceInode() } KResult DevFSDeviceInode::chown(uid_t uid, gid_t gid) { - Locker locker(m_lock); + Locker locker(m_inode_lock); m_uid = uid; m_gid = gid; return KSuccess; @@ -343,7 +343,7 @@ KResult DevFSDeviceInode::chown(uid_t uid, gid_t gid) String DevFSDeviceInode::name() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (m_cached_name.is_null() || m_cached_name.is_empty()) const_cast(*this).m_cached_name = m_attached_device->device_name(); return m_cached_name; @@ -351,7 +351,7 @@ String DevFSDeviceInode::name() const KResultOr DevFSDeviceInode::read_bytes(off_t offset, size_t count, UserOrKernelBuffer& buffer, FileDescription* description) const { - Locker locker(m_lock); + Locker locker(m_inode_lock); VERIFY(!!description); if (!m_attached_device->can_read(*description, offset)) return 0; @@ -363,7 +363,7 @@ KResultOr DevFSDeviceInode::read_bytes(off_t offset, size_t count, UserO InodeMetadata DevFSDeviceInode::metadata() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); InodeMetadata metadata; metadata.inode = { fsid(), index() }; metadata.mode = (m_attached_device->is_block_device() ? S_IFBLK : S_IFCHR) | m_attached_device->required_mode(); @@ -377,7 +377,7 @@ InodeMetadata DevFSDeviceInode::metadata() const } KResultOr DevFSDeviceInode::write_bytes(off_t offset, size_t count, const UserOrKernelBuffer& buffer, FileDescription* description) { - Locker locker(m_lock); + Locker locker(m_inode_lock); VERIFY(!!description); if (!m_attached_device->can_write(*description, offset)) return 0; @@ -393,7 +393,7 @@ DevFSPtsDirectoryInode::DevFSPtsDirectoryInode(DevFS& fs) } KResult DevFSPtsDirectoryInode::traverse_as_directory(Function callback) const { - Locker locker(m_lock); + Locker locker(m_inode_lock); callback({ ".", identifier(), 0 }); callback({ "..", identifier(), 0 }); return KSuccess; @@ -407,7 +407,7 @@ DevFSPtsDirectoryInode::~DevFSPtsDirectoryInode() } InodeMetadata DevFSPtsDirectoryInode::metadata() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); InodeMetadata metadata; metadata.inode = { fsid(), index() }; metadata.mode = 0040555; diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp index 3df0143398..cfb387c39f 100644 --- a/Kernel/FileSystem/Ext2FileSystem.cpp +++ b/Kernel/FileSystem/Ext2FileSystem.cpp @@ -384,7 +384,7 @@ KResult Ext2FSInode::shrink_triply_indirect_block(BlockBasedFileSystem::BlockInd KResult Ext2FSInode::flush_block_list() { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (m_block_list.is_empty()) { m_raw_inode.i_blocks = 0; @@ -752,7 +752,7 @@ u64 Ext2FSInode::size() const InodeMetadata Ext2FSInode::metadata() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); InodeMetadata metadata; metadata.inode = identifier(); metadata.size = size(); @@ -779,7 +779,7 @@ InodeMetadata Ext2FSInode::metadata() const void Ext2FSInode::flush_metadata() { - Locker locker(m_lock); + Locker locker(m_inode_lock); dbgln_if(EXT2_DEBUG, "Ext2FSInode[{}]::flush_metadata(): Flushing inode", identifier()); fs().write_ext2_inode(index(), m_raw_inode); if (is_directory()) { @@ -829,7 +829,7 @@ RefPtr Ext2FS::get_inode(InodeIdentifier inode) const KResultOr Ext2FSInode::read_bytes(off_t offset, size_t count, UserOrKernelBuffer& buffer, FileDescription* description) const { - Locker inode_locker(m_lock); + Locker inode_locker(m_inode_lock); VERIFY(offset >= 0); if (m_raw_inode.i_size == 0) return 0; @@ -979,7 +979,7 @@ KResultOr Ext2FSInode::write_bytes(off_t offset, size_t count, const Use if (count == 0) return 0; - Locker inode_locker(m_lock); + Locker inode_locker(m_inode_lock); if (auto result = prepare_to_write_data(); result.is_error()) return result; @@ -1106,7 +1106,7 @@ KResult Ext2FSInode::traverse_as_directory(Function& entries) { - Locker locker(m_lock); + Locker locker(m_inode_lock); auto block_size = fs().block_size(); // Calculate directory size and record length of entries so that @@ -1173,7 +1173,7 @@ KResultOr> Ext2FSInode::create_child(const String& name, mo KResult Ext2FSInode::add_child(Inode& child, const StringView& name, mode_t mode) { - Locker locker(m_lock); + Locker locker(m_inode_lock); VERIFY(is_directory()); if (name.length() > EXT2_NAME_LEN) @@ -1219,7 +1219,7 @@ KResult Ext2FSInode::add_child(Inode& child, const StringView& name, mode_t mode KResult Ext2FSInode::remove_child(const StringView& name) { - Locker locker(m_lock); + Locker locker(m_inode_lock); dbgln_if(EXT2_DEBUG, "Ext2FSInode[{}]::remove_child(): Removing '{}'", identifier(), name); VERIFY(is_directory()); @@ -1599,7 +1599,7 @@ KResultOr> Ext2FS::create_inode(Ext2FSInode& parent_inode, KResult Ext2FSInode::populate_lookup_cache() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (!m_lookup_cache.is_empty()) return KSuccess; HashMap children; @@ -1626,7 +1626,7 @@ RefPtr Ext2FSInode::lookup(StringView name) InodeIndex inode_index; { - Locker locker(m_lock); + Locker locker(m_inode_lock); auto it = m_lookup_cache.find(name.hash(), [&](auto& entry) { return entry.key == name; }); if (it == m_lookup_cache.end()) { dbgln_if(EXT2_DEBUG, "Ext2FSInode[{}]:lookup(): '{}' not found", identifier(), name); @@ -1644,7 +1644,7 @@ void Ext2FSInode::one_ref_left() KResult Ext2FSInode::set_atime(time_t t) { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (fs().is_readonly()) return EROFS; m_raw_inode.i_atime = t; @@ -1654,7 +1654,7 @@ KResult Ext2FSInode::set_atime(time_t t) KResult Ext2FSInode::set_ctime(time_t t) { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (fs().is_readonly()) return EROFS; m_raw_inode.i_ctime = t; @@ -1664,7 +1664,7 @@ KResult Ext2FSInode::set_ctime(time_t t) KResult Ext2FSInode::set_mtime(time_t t) { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (fs().is_readonly()) return EROFS; m_raw_inode.i_mtime = t; @@ -1674,7 +1674,7 @@ KResult Ext2FSInode::set_mtime(time_t t) KResult Ext2FSInode::increment_link_count() { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (fs().is_readonly()) return EROFS; constexpr size_t max_link_count = 65535; @@ -1687,7 +1687,7 @@ KResult Ext2FSInode::increment_link_count() KResult Ext2FSInode::decrement_link_count() { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (fs().is_readonly()) return EROFS; VERIFY(m_raw_inode.i_links_count); @@ -1712,7 +1712,7 @@ void Ext2FS::uncache_inode(InodeIndex index) KResultOr Ext2FSInode::directory_entry_count() const { VERIFY(is_directory()); - Locker locker(m_lock); + Locker locker(m_inode_lock); if (auto result = populate_lookup_cache(); result.is_error()) return KResultOr(result); return m_lookup_cache.size(); @@ -1720,7 +1720,7 @@ KResultOr Ext2FSInode::directory_entry_count() const KResult Ext2FSInode::chmod(mode_t mode) { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (m_raw_inode.i_mode == mode) return KSuccess; m_raw_inode.i_mode = mode; @@ -1730,7 +1730,7 @@ KResult Ext2FSInode::chmod(mode_t mode) KResult Ext2FSInode::chown(uid_t uid, gid_t gid) { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (m_raw_inode.i_uid == uid && m_raw_inode.i_gid == gid) return KSuccess; m_raw_inode.i_uid = uid; @@ -1741,7 +1741,7 @@ KResult Ext2FSInode::chown(uid_t uid, gid_t gid) KResult Ext2FSInode::truncate(u64 size) { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (static_cast(m_raw_inode.i_size) == size) return KSuccess; if (auto result = resize(size); result.is_error()) @@ -1752,7 +1752,7 @@ KResult Ext2FSInode::truncate(u64 size) KResultOr Ext2FSInode::get_block_address(int index) { - Locker locker(m_lock); + Locker locker(m_inode_lock); if (m_block_list.is_empty()) m_block_list = compute_block_list(); diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp index d454400b08..0072c8848b 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_lock); + Locker 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_lock); + Locker locker(m_inode_lock); m_shared_vmobject = vmobject; } bool Inode::bind_socket(LocalSocket& socket) { - Locker locker(m_lock); + Locker 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_lock); + Locker 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& watcher) { - Locker locker(m_lock); + Locker locker(m_inode_lock); VERIFY(!m_watchers.contains(&watcher)); m_watchers.set(&watcher); } void Inode::unregister_watcher(Badge, InodeWatcher& watcher) { - Locker locker(m_lock); + Locker locker(m_inode_lock); VERIFY(m_watchers.contains(&watcher)); m_watchers.remove(&watcher); } NonnullRefPtr Inode::fifo() { - Locker locker(m_lock); + Locker 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 Inode::fifo() void Inode::set_metadata_dirty(bool metadata_dirty) { - Locker locker(m_lock); + Locker 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_lock); + Locker 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_lock); + Locker 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_lock); + Locker 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_lock); + Locker 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_lock); + Locker 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 Inode::shared_vmobject() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); return m_shared_vmobject.strong_ref(); } diff --git a/Kernel/FileSystem/Inode.h b/Kernel/FileSystem/Inode.h index 9e5e2230f3..2ef33d402b 100644 --- a/Kernel/FileSystem/Inode.h +++ b/Kernel/FileSystem/Inode.h @@ -108,7 +108,7 @@ protected: void did_modify_contents(); void did_delete_self(); - mutable Mutex m_lock { "Inode" }; + mutable Mutex m_inode_lock { "Inode" }; private: FileSystem& m_file_system; diff --git a/Kernel/FileSystem/Plan9FileSystem.cpp b/Kernel/FileSystem/Plan9FileSystem.cpp index 6b3bc31d32..d0fdbc64d7 100644 --- a/Kernel/FileSystem/Plan9FileSystem.cpp +++ b/Kernel/FileSystem/Plan9FileSystem.cpp @@ -698,7 +698,7 @@ KResult Plan9FSInode::ensure_open_for_mode(int mode) u8 p9_mode = 0; { - Locker locker(m_lock); + Locker locker(m_inode_lock); // If it's already open in this mode, we're done. if ((m_open_mode & mode) == mode) diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index bed114a1aa..f443e467c8 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -138,7 +138,7 @@ RefPtr ProcFSInode::lookup(StringView) InodeMetadata ProcFSInode::metadata() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); InodeMetadata metadata; metadata.inode = { fsid(), m_associated_component->component_index() }; metadata.mode = m_associated_component->required_mode(); @@ -209,7 +209,7 @@ ProcFSDirectoryInode::~ProcFSDirectoryInode() } InodeMetadata ProcFSDirectoryInode::metadata() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); InodeMetadata metadata; metadata.inode = { fsid(), m_associated_component->component_index() }; metadata.mode = S_IFDIR | m_associated_component->required_mode(); @@ -236,7 +236,7 @@ RefPtr ProcFSDirectoryInode::lookup(StringView name) KResultOr ProcFSDirectoryInode::directory_entry_count() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); return m_associated_component->entries_count(); } @@ -251,7 +251,7 @@ ProcFSLinkInode::ProcFSLinkInode(const ProcFS& fs, const ProcFSExposedComponent& } InodeMetadata ProcFSLinkInode::metadata() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); InodeMetadata metadata; metadata.inode = { fsid(), m_associated_component->component_index() }; metadata.mode = S_IFLNK | m_associated_component->required_mode(); diff --git a/Kernel/FileSystem/SysFS.cpp b/Kernel/FileSystem/SysFS.cpp index fd5a760c48..bf08129363 100644 --- a/Kernel/FileSystem/SysFS.cpp +++ b/Kernel/FileSystem/SysFS.cpp @@ -110,7 +110,7 @@ RefPtr SysFSInode::lookup(StringView) InodeMetadata SysFSInode::metadata() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); InodeMetadata metadata; metadata.inode = { fsid(), m_associated_component->component_index() }; metadata.mode = S_IFREG | S_IRUSR | S_IRGRP | S_IROTH; @@ -181,7 +181,7 @@ SysFSDirectoryInode::~SysFSDirectoryInode() } InodeMetadata SysFSDirectoryInode::metadata() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); InodeMetadata metadata; metadata.inode = { fsid(), m_associated_component->component_index() }; metadata.mode = S_IFDIR | S_IRUSR | S_IRGRP | S_IROTH | S_IXOTH; @@ -208,7 +208,7 @@ RefPtr SysFSDirectoryInode::lookup(StringView name) KResultOr SysFSDirectoryInode::directory_entry_count() const { - Locker locker(m_lock); + Locker locker(m_inode_lock); return m_associated_component->entries_count(); } diff --git a/Kernel/FileSystem/TmpFS.cpp b/Kernel/FileSystem/TmpFS.cpp index 66951f95ab..ea7d4a6171 100644 --- a/Kernel/FileSystem/TmpFS.cpp +++ b/Kernel/FileSystem/TmpFS.cpp @@ -105,14 +105,14 @@ RefPtr TmpFSInode::create_root(TmpFS& fs) InodeMetadata TmpFSInode::metadata() const { - Locker locker(m_lock, Mutex::Mode::Shared); + Locker locker(m_inode_lock, Mutex::Mode::Shared); return m_metadata; } KResult TmpFSInode::traverse_as_directory(Function callback) const { - Locker locker(m_lock, Mutex::Mode::Shared); + Locker locker(m_inode_lock, Mutex::Mode::Shared); if (!is_directory()) return ENOTDIR; @@ -129,7 +129,7 @@ KResult TmpFSInode::traverse_as_directory(Function TmpFSInode::read_bytes(off_t offset, size_t size, UserOrKernelBuffer& buffer, FileDescription*) const { - Locker locker(m_lock, Mutex::Mode::Shared); + Locker locker(m_inode_lock, Mutex::Mode::Shared); VERIFY(!is_directory()); VERIFY(offset >= 0); @@ -149,7 +149,7 @@ KResultOr TmpFSInode::read_bytes(off_t offset, size_t size, UserOrKernel KResultOr TmpFSInode::write_bytes(off_t offset, size_t size, const UserOrKernelBuffer& buffer, FileDescription*) { - Locker locker(m_lock); + Locker locker(m_inode_lock); VERIFY(!is_directory()); VERIFY(offset >= 0); @@ -198,7 +198,7 @@ KResultOr TmpFSInode::write_bytes(off_t offset, size_t size, const UserO RefPtr TmpFSInode::lookup(StringView name) { - Locker locker(m_lock, Mutex::Mode::Shared); + Locker locker(m_inode_lock, Mutex::Mode::Shared); VERIFY(is_directory()); if (name == ".") @@ -214,7 +214,7 @@ RefPtr TmpFSInode::lookup(StringView name) KResultOr TmpFSInode::directory_entry_count() const { - Locker locker(m_lock, Mutex::Mode::Shared); + Locker locker(m_inode_lock, Mutex::Mode::Shared); VERIFY(is_directory()); return 2 + m_children.size(); } @@ -237,7 +237,7 @@ void TmpFSInode::flush_metadata() KResult TmpFSInode::chmod(mode_t mode) { - Locker locker(m_lock); + Locker locker(m_inode_lock); m_metadata.mode = mode; notify_watchers(); @@ -246,7 +246,7 @@ KResult TmpFSInode::chmod(mode_t mode) KResult TmpFSInode::chown(uid_t uid, gid_t gid) { - Locker locker(m_lock); + Locker locker(m_inode_lock); m_metadata.uid = uid; m_metadata.gid = gid; @@ -256,7 +256,7 @@ KResult TmpFSInode::chown(uid_t uid, gid_t gid) KResultOr> TmpFSInode::create_child(const String& name, mode_t mode, dev_t dev, uid_t uid, gid_t gid) { - Locker locker(m_lock); + Locker locker(m_inode_lock); // TODO: Support creating devices on TmpFS. if (dev != 0) @@ -283,7 +283,7 @@ KResultOr> TmpFSInode::create_child(const String& name, mod KResult TmpFSInode::add_child(Inode& child, const StringView& name, mode_t) { - Locker locker(m_lock); + Locker locker(m_inode_lock); VERIFY(is_directory()); VERIFY(child.fsid() == fsid()); @@ -297,7 +297,7 @@ KResult TmpFSInode::add_child(Inode& child, const StringView& name, mode_t) KResult TmpFSInode::remove_child(const StringView& name) { - Locker locker(m_lock); + Locker locker(m_inode_lock); VERIFY(is_directory()); if (name == "." || name == "..") @@ -315,7 +315,7 @@ KResult TmpFSInode::remove_child(const StringView& name) KResult TmpFSInode::truncate(u64 size) { - Locker locker(m_lock); + Locker locker(m_inode_lock); VERIFY(!is_directory()); if (size == 0) @@ -345,7 +345,7 @@ KResult TmpFSInode::truncate(u64 size) KResult TmpFSInode::set_atime(time_t time) { - Locker locker(m_lock); + Locker locker(m_inode_lock); m_metadata.atime = time; set_metadata_dirty(true); @@ -355,7 +355,7 @@ KResult TmpFSInode::set_atime(time_t time) KResult TmpFSInode::set_ctime(time_t time) { - Locker locker(m_lock); + Locker locker(m_inode_lock); m_metadata.ctime = time; notify_watchers(); @@ -364,7 +364,7 @@ KResult TmpFSInode::set_ctime(time_t time) KResult TmpFSInode::set_mtime(time_t t) { - Locker locker(m_lock); + Locker locker(m_inode_lock); m_metadata.mtime = t; notify_watchers(); -- cgit v1.2.3