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

Function vm_object_reference_vnode

freebsd/vm/vm_object.c:475–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

473}
474
475static void
476vm_object_reference_vnode(vm_object_t object)
477{
478 u_int old;
479
480 /*
481 * vnode objects need the lock for the first reference
482 * to serialize with vnode_object_deallocate().
483 */
484 if (!refcount_acquire_if_gt(&object->ref_count, 0)) {
485 VM_OBJECT_RLOCK(object);
486 old = refcount_acquire(&object->ref_count);
487 if (object->type == OBJT_VNODE && old == 0)
488 vref(object->handle);
489 VM_OBJECT_RUNLOCK(object);
490 }
491}
492
493/*
494 * vm_object_reference:

Callers 1

vm_object_referenceFunction · 0.85

Calls 3

refcount_acquire_if_gtFunction · 0.85
refcount_acquireFunction · 0.85
vrefFunction · 0.50

Tested by

no test coverage detected