#10522: Assert failed in TrashWatcher -----------------------------+---------------------------- Reporter: kallisti5 | Owner: axeld Type: bug | Status: new Priority: normal | Milestone: R1 Component: System/Kernel | Version: R1/Development Resolution: | Keywords: vfs Blocked By: | Blocking: Has a Patch: 0 | Platform: x86-64 -----------------------------+---------------------------- Comment (by korli): I had a look at the code: * [http://cgit.haiku-os.org/haiku/tree/src/system/kernel/fs/vfs.cpp#n689 get_mount()] acquires a read lock for sVnodeLock and a mutex lock for sMountMutex * [http://cgit.haiku-os.org/haiku/tree/src/system/kernel/fs/vfs.cpp#n1084 inc_vnode_ref_count()] requires sVnodeLock read locked and the vnode's lock, or sVnodeLock write locked. My guess would be to add a {{{ AutoLocker<Vnode> nodeLocker(rootNode); }}} [http://cgit.haiku-os.org/haiku/tree/src/system/kernel/fs/vfs.cpp#n705 here]. Other questions are: * why we increment the refcount on {{{mount->root_vnode}}} and not {{{rootNode}}}. * what to do if the rootNode is unused after acquiring the lock. -- Ticket URL: <https://dev.haiku-os.org/ticket/10522#comment:10> Haiku <https://dev.haiku-os.org> Haiku - the operating system.