Kernel: Remove unnecessary locks from Pipe

Inode already locks its own mutex when read/write is called there is no
need to explicitly lock them in read_impl/write_impl
This commit is contained in:
Bananymous 2025-06-02 10:52:02 +03:00
parent 9883fb7bf6
commit e109b5cff6
1 changed files with 0 additions and 4 deletions

View File

@ -67,8 +67,6 @@ namespace Kernel
BAN::ErrorOr<size_t> Pipe::read_impl(off_t, BAN::ByteSpan buffer)
{
LockGuard _(m_mutex);
while (m_buffer_size == 0)
{
if (m_writing_count == 0)
@ -103,8 +101,6 @@ namespace Kernel
BAN::ErrorOr<size_t> Pipe::write_impl(off_t, BAN::ConstByteSpan buffer)
{
LockGuard _(m_mutex);
while (m_buffer_size >= m_buffer.size())
{
if (m_reading_count == 0)