From 5dd8189048abe82319c23d1e3aef5a547e32844a Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 6 Nov 2023 20:43:58 +0200 Subject: [PATCH] Kernel: Fix ext2 directory listing for big directories --- kernel/kernel/FS/Ext2/Inode.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/kernel/FS/Ext2/Inode.cpp b/kernel/kernel/FS/Ext2/Inode.cpp index 0103a6e9ec..54a82ea663 100644 --- a/kernel/kernel/FS/Ext2/Inode.cpp +++ b/kernel/kernel/FS/Ext2/Inode.cpp @@ -306,8 +306,7 @@ done: ASSERT(mode().ifdir()); ASSERT(offset >= 0); - const uint32_t data_block_count = blocks(); - if (offset >= data_block_count) + if (offset >= max_used_data_block_count()) { list->entry_count = 0; return {};