2008/6/23 Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>: > "Salvatore Benedetto" <emitrax@xxxxxxxxx> wrote: >> Can somebody review it and give me his bless so that I can commit >> it please? > > Thanks for diff! I've solved it a bit differently by cleaning up the > class a bit more, though (see r26097). Yep, I was just going through your diff. > Note also that fOk should have been initialized with "false" in that > patch, or else, if Get() was never called, put_vnode() would still had > been called upon destruction (Vnode previously suffered from the same > problem, as I pointed out in the reply to your original mail). > > Bye, > Axel. Anyway, how about the leaf reference in vm_page? Regards, -- Salvatore Benedetto (a.k.a. emitrax) Student of Computer Engineer University of Pisa www.haiku-os.it
Index: src/system/kernel/vm/vm_page.cpp =================================================================== --- src/system/kernel/vm/vm_page.cpp (revision 26097) +++ src/system/kernel/vm/vm_page.cpp (working copy) @@ -1011,8 +1011,12 @@ InterruptsSpinLocker locker(sPageLock); // state might have change while we were locking the cache - if (page->state != PAGE_STATE_MODIFIED) + if (page->state != PAGE_STATE_MODIFIED) { + // release the cache reference first + if (cache->store->ops->release_ref != NULL) + cache->store->ops->release_ref(cache->store); continue; + } remove_page_from_queue(&sModifiedPageQueue, page); page->state = PAGE_STATE_BUSY;