Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/uipc_usrreq.c
Show First 20 Lines • Show All 654 Lines • ▼ Show 20 Lines | if (vp != NULL || vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) { | ||||
} | } | ||||
error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH); | error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH); | ||||
if (error) | if (error) | ||||
goto error; | goto error; | ||||
goto restart; | goto restart; | ||||
} | } | ||||
VATTR_NULL(&vattr); | VATTR_NULL(&vattr); | ||||
vattr.va_type = VSOCK; | vattr.va_type = VSOCK; | ||||
vattr.va_mode = (ACCESSPERMS & ~td->td_proc->p_fd->fd_cmask); | vattr.va_mode = (ACCESSPERMS & ~td->td_proc->p_pd->pd_cmask); | ||||
#ifdef MAC | #ifdef MAC | ||||
error = mac_vnode_check_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, | error = mac_vnode_check_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, | ||||
&vattr); | &vattr); | ||||
#endif | #endif | ||||
if (error == 0) | if (error == 0) | ||||
error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); | error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); | ||||
NDFREE(&nd, NDF_ONLY_PNBUF); | NDFREE(&nd, NDF_ONLY_PNBUF); | ||||
vput(nd.ni_dvp); | vput(nd.ni_dvp); | ||||
▲ Show 20 Lines • Show All 2,289 Lines • Show Last 20 Lines |