mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
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:
parent
7d91724dd2
commit
0a793a7fa3
Notes:
sideshowbarker
2024-07-17 06:37:38 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/0a793a7fa3 Pull-request: https://github.com/SerenityOS/serenity/pull/15369 Reviewed-by: https://github.com/IdanHo ✅
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue