Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_mmap.c
Show First 20 Lines • Show All 1,288 Lines • ▼ Show 20 Lines | if (vp->v_type == VREG) { | ||||
if (writex) { | if (writex) { | ||||
*writecounted = TRUE; | *writecounted = TRUE; | ||||
vm_pager_update_writecount(obj, 0, objsize); | vm_pager_update_writecount(obj, 0, objsize); | ||||
} | } | ||||
} else { | } else { | ||||
error = EINVAL; | error = EINVAL; | ||||
goto done; | goto done; | ||||
} | } | ||||
if ((error = VOP_GETATTR(vp, &va, cred))) | if ((error = VOP_GETATTR(vp, 0, &va, cred))) | ||||
goto done; | goto done; | ||||
#ifdef MAC | #ifdef MAC | ||||
/* This relies on VM_PROT_* matching PROT_*. */ | /* This relies on VM_PROT_* matching PROT_*. */ | ||||
error = mac_vnode_check_mmap(cred, vp, (int)prot, flags); | error = mac_vnode_check_mmap(cred, vp, (int)prot, flags); | ||||
if (error != 0) | if (error != 0) | ||||
goto done; | goto done; | ||||
#endif | #endif | ||||
if ((flags & MAP_SHARED) != 0) { | if ((flags & MAP_SHARED) != 0) { | ||||
▲ Show 20 Lines • Show All 337 Lines • Show Last 20 Lines |