MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_object_deallocate_vnode

Function vm_object_deallocate_vnode

freebsd/vm/vm_object.c:536–558  ·  view source on GitHub ↗

* Handle deallocating an object of type OBJT_VNODE. */

Source from the content-addressed store, hash-verified

534 * Handle deallocating an object of type OBJT_VNODE.
535 */
536static void
537vm_object_deallocate_vnode(vm_object_t object)
538{
539 struct vnode *vp = (struct vnode *) object->handle;
540 bool last;
541
542 KASSERT(object->type == OBJT_VNODE,
543 ("vm_object_deallocate_vnode: not a vnode object"));
544 KASSERT(vp != NULL, ("vm_object_deallocate_vnode: missing vp"));
545
546 /* Object lock to protect handle lookup. */
547 last = refcount_release(&object->ref_count);
548 VM_OBJECT_RUNLOCK(object);
549
550 if (!last)
551 return;
552
553 if (!umtx_shm_vnobj_persistent)
554 umtx_shm_object_terminated(object);
555
556 /* vrele may need the vnode lock. */
557 vrele(vp);
558}
559
560/*
561 * We dropped a reference on an object and discovered that it had a

Callers 1

vm_object_deallocateFunction · 0.85

Calls 3

refcount_releaseFunction · 0.85
vreleFunction · 0.50

Tested by

no test coverage detected