mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +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
2 changed files with 0 additions and 2 deletions
|
@ -33,7 +33,6 @@ class Inode : public ListedRefCounted<Inode, LockType::Spinlock>
|
||||||
friend class VirtualFileSystem;
|
friend class VirtualFileSystem;
|
||||||
friend class FileSystem;
|
friend class FileSystem;
|
||||||
friend class InodeFile;
|
friend class InodeFile;
|
||||||
friend class Kernel::Memory::SharedInodeVMObject; // FIXME: Remove when write_bytes becomes non-virtual
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~Inode();
|
virtual ~Inode();
|
||||||
|
|
|
@ -63,7 +63,6 @@ ErrorOr<void> SharedInodeVMObject::sync(off_t offset_in_pages, size_t pages)
|
||||||
u8 page_buffer[PAGE_SIZE];
|
u8 page_buffer[PAGE_SIZE];
|
||||||
MM.copy_physical_page(*physical_page, page_buffer);
|
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));
|
TRY(m_inode->write_bytes(page_index * PAGE_SIZE, PAGE_SIZE, UserOrKernelBuffer::for_kernel_buffer(page_buffer), nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue