mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 20:15:07 +00:00
Kernel: Make Inode::read_entire() return a KBuffer (not ByteBuffer)
ByteBuffer is backed by kmalloc heap memory which is a scarce resource. This fixes an OOM panic when traversing a large directory.
This commit is contained in:
parent
ec93d6ffdc
commit
62ec6e5fe0
7 changed files with 12 additions and 16 deletions
|
@ -163,7 +163,7 @@ bool FileDescription::can_read() const
|
|||
return m_file->can_read(*this, offset());
|
||||
}
|
||||
|
||||
KResultOr<ByteBuffer> FileDescription::read_entire_file()
|
||||
KResultOr<KBuffer> FileDescription::read_entire_file()
|
||||
{
|
||||
// HACK ALERT: (This entire function)
|
||||
ASSERT(m_file->is_inode());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue