From 54b728cc6a9769ab82e70fb119871ad6f7c9e510 Mon Sep 17 00:00:00 2001 From: "Roberto E. Vargas Caballero" Date: Mon, 26 Feb 2018 18:54:35 +0000 Subject: [PATCH] kernel: Initialize dirty and time flags of bb The buffer cache is not located in bss in some configurations, and it means that the memory is not initialized when the system boots. When emulators allocate the memory, it is initialized to 0 by the operating system, but it doesn't happen in actual hardware. --- Kernel/start.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Kernel/start.c b/Kernel/start.c index c1ee2597..4d69898c 100644 --- a/Kernel/start.c +++ b/Kernel/start.c @@ -45,6 +45,8 @@ void bufinit(void) for (bp = bufpool; bp < bufpool_end; ++bp) { bp->bf_dev = NO_DEVICE; bp->bf_busy = BF_FREE; + bp->bf_dirty = 0; + bp->bf_time = 0; } } -- 2.34.1