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

Function vm_object_vnode

freebsd/vm/vm_object.c:2432–2449  ·  view source on GitHub ↗

* Return the vnode for the given object, or NULL if none exists. * For tmpfs objects, the function may return NULL if there is * no vnode allocated at the time of the call. */

Source from the content-addressed store, hash-verified

2430 * no vnode allocated at the time of the call.
2431 */
2432struct vnode *
2433vm_object_vnode(vm_object_t object)
2434{
2435 struct vnode *vp;
2436
2437 VM_OBJECT_ASSERT_LOCKED(object);
2438 if (object->type == OBJT_VNODE) {
2439 vp = object->handle;
2440 KASSERT(vp != NULL, ("%s: OBJT_VNODE has no vnode", __func__));
2441 } else if (object->type == OBJT_SWAP &&
2442 (object->flags & OBJ_TMPFS) != 0) {
2443 vp = object->un_pager.swp.swp_tmpfs;
2444 KASSERT(vp != NULL, ("%s: OBJT_TMPFS has no vnode", __func__));
2445 } else {
2446 vp = NULL;
2447 }
2448 return (vp);
2449}
2450
2451/*
2452 * Busy the vm object. This prevents new pages belonging to the object from

Callers 2

ptrace_vm_entryFunction · 0.85
vm_object_kvme_typeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected