kernel/vm: Rework ordering of _RemoveConsumer and drop "unmergeable" flag.

This reverts a8877df135.

Previously, the "unmergeable" flag was necessary for the RAMFS,
because if the last vnode reference was released while there
was still a consumer (as the old ordering of _RemoveConsumer
had), then the release of the cache reference when the vnode
was removed would result in the cache trying to merge with
its now-only consumer and sole referrer.

Now, instead, we remove the consumer before releasing the store
reference, so that there's no chance the cache will be merged
inside this method.

mmap_cut_tests still pass, web browsers using ramfs shared_memory
still seem to work.
This commit is contained in:
Augustin Cavalier
2024-12-17 19:12:40 -05:00
parent 7eeb28152e
commit f836917f47
3 changed files with 10 additions and 12 deletions
-1
View File
@@ -200,7 +200,6 @@ public:
// TODO: Remove!
uint32 page_count;
uint32 temporary : 1;
uint32 unmergeable : 1;
uint32 type : 6;
#if DEBUG_CACHE_LIST