From dcbba214309ee718136c47adcd5096b858d685d7 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 13 Nov 2024 14:11:35 -0500 Subject: [PATCH] ram_disk & ramfs: Pages aren't "accessed" outside the lock area. This flag is only really needed for modifications to queues, mappings, etc. on the page, and not on regular reads and writes. For that, "busy" suffices. This mirrors the file cache's behavior, and avoids invalidly holding the page's "accessed" state without the cache lock. Fixes #19233. --- .../kernel/drivers/disk/virtual/ram_disk/cache_support.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/add-ons/kernel/drivers/disk/virtual/ram_disk/cache_support.h b/src/add-ons/kernel/drivers/disk/virtual/ram_disk/cache_support.h index 3b2e35d34f..ad859902a2 100644 --- a/src/add-ons/kernel/drivers/disk/virtual/ram_disk/cache_support.h +++ b/src/add-ons/kernel/drivers/disk/virtual/ram_disk/cache_support.h @@ -25,7 +25,6 @@ cache_get_pages(VMCache* cache, off_t offset, off_t length, bool isWrite, vm_pag continue; } - DEBUG_PAGE_ACCESS_START(page); page->busy = true; } else missingPages++; @@ -79,7 +78,6 @@ cache_put_pages(VMCache* cache, off_t offset, off_t length, vm_page** pages, boo vm_page_free(NULL, page); } else { cache->MarkPageUnbusy(page); - DEBUG_PAGE_ACCESS_END(page); } }