1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

Kernel: Handle OOM in DiskCache when mounting Ext2 filesystems

Create the disk cache up front, so we can verify it succeeds.
Make the KBuffer allocation fail-able, so we can properly handle
failure when the user asks up to mount a Ext2 filesystem under
OOM conditions.
This commit is contained in:
Brian Gianforcaro 2021-08-01 04:33:06 -07:00 committed by Andreas Kling
parent 187c086270
commit a6db2f985a
3 changed files with 36 additions and 12 deletions

View file

@ -15,6 +15,7 @@ public:
TYPEDEF_DISTINCT_ORDERED_ID(u64, BlockIndex);
virtual ~BlockBasedFileSystem() override;
virtual bool initialize() override;
u64 logical_block_size() const { return m_logical_block_size; };