From 42bee3a8aa42461134280dffb15a6ea3bd34f280 Mon Sep 17 00:00:00 2001 From: acevest Date: Fri, 11 Oct 2024 22:16:32 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E9=81=8D=E5=8E=86page=20hash?= =?utf8?q?=E6=AD=BB=E5=BE=AA=E7=8E=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- fs/file.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/file.c b/fs/file.c index a034ac7..dd03206 100644 --- a/fs/file.c +++ b/fs/file.c @@ -52,13 +52,14 @@ page_t *find_hash_page(address_space_t *mapping, uint32_t index) { page_t *p = page_hash_table[hash]; while (p != NULL) { - if (p->mapping != mapping) { - continue; - } - if (p->index == index) { - page = p; - break; + if (p->mapping == mapping) { + if (p->index == index) { + page = p; + break; + } } + + p = p->hash_next; } EXIT_CRITICAL_ZONE(EFLAGS); -- 2.44.0