From 181d139c7daf12be3f6ef5f09d52e7d67f726e41 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 0103a6e9..54a82ea6 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 {};