Kernel/FileSystem: Remove the locking of a Inode mutex in InodeVMObjects

We no longer require to lock the m_inode_lock in the SharedInodeVMObject
code as the methods write_bytes and read_bytes of the Inode class do
this for us now.
This commit is contained in:
Liav A 2022-09-24 13:23:46 +03:00 committed by Idan Horowitz
parent 7d91724dd2
commit 0a793a7fa3
Notes: sideshowbarker 2024-07-17 06:37:38 +09:00
2 changed files with 0 additions and 2 deletions

View file

@ -33,7 +33,6 @@ class Inode : public ListedRefCounted<Inode, LockType::Spinlock>
friend class VirtualFileSystem;
friend class FileSystem;
friend class InodeFile;
friend class Kernel::Memory::SharedInodeVMObject; // FIXME: Remove when write_bytes becomes non-virtual
public:
virtual ~Inode();

View file

@ -63,7 +63,6 @@ ErrorOr<void> SharedInodeVMObject::sync(off_t offset_in_pages, size_t pages)
u8 page_buffer[PAGE_SIZE];
MM.copy_physical_page(*physical_page, page_buffer);
MutexLocker locker(m_inode->m_inode_lock);
TRY(m_inode->write_bytes(page_index * PAGE_SIZE, PAGE_SIZE, UserOrKernelBuffer::for_kernel_buffer(page_buffer), nullptr));
}