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.
This commit is contained in:
Augustin Cavalier 2024-11-13 14:11:35 -05:00
parent 5c9dc91f64
commit dcbba21430

View File

@ -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);
}
}