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

Function vnode_fini

freebsd/kern/vfs_subr.c:579–595  ·  view source on GitHub ↗

* Free a vnode when it is cleared from the zone. */

Source from the content-addressed store, hash-verified

577 * Free a vnode when it is cleared from the zone.
578 */
579static void
580vnode_fini(void *mem, int size)
581{
582 struct vnode *vp;
583 struct bufobj *bo;
584
585 vp = mem;
586 vdbatch_dequeue(vp);
587 mtx_lock(&vnode_list_mtx);
588 TAILQ_REMOVE(&vnode_list, vp, v_vnodelist);
589 mtx_unlock(&vnode_list_mtx);
590 rangelock_destroy(&vp->v_rl);
591 lockdestroy(vp->v_vnlock);
592 mtx_destroy(&vp->v_interlock);
593 bo = &vp->v_bufobj;
594 rw_destroy(BO_LOCKPTR(bo));
595}
596
597/*
598 * Provide the size of NFS nclnode and NFS fh for calculation of the

Callers

nothing calls this directly

Calls 6

vdbatch_dequeueFunction · 0.85
rangelock_destroyFunction · 0.85
lockdestroyFunction · 0.85
rw_destroyFunction · 0.85
mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected