Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/md/md.c
Show First 20 Lines • Show All 1,436 Lines • ▼ Show 20 Lines | mdcreate_vnode(struct md_s *sc, struct md_req *mdr, struct thread *td) | ||||
error = vn_open(&nd, &flags, 0, NULL); | error = vn_open(&nd, &flags, 0, NULL); | ||||
if (error != 0) | if (error != 0) | ||||
return (error); | return (error); | ||||
NDFREE_PNBUF(&nd); | NDFREE_PNBUF(&nd); | ||||
if (nd.ni_vp->v_type != VREG) { | if (nd.ni_vp->v_type != VREG) { | ||||
error = EINVAL; | error = EINVAL; | ||||
goto bad; | goto bad; | ||||
} | } | ||||
error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred); | error = VOP_GETATTR(nd.ni_vp, 0, &vattr, td->td_ucred); | ||||
if (error != 0) | if (error != 0) | ||||
goto bad; | goto bad; | ||||
if ((mdr->md_options & MD_MUSTDEALLOC) != 0) { | if ((mdr->md_options & MD_MUSTDEALLOC) != 0) { | ||||
error = VOP_PATHCONF(nd.ni_vp, _PC_DEALLOC_PRESENT, &v); | error = VOP_PATHCONF(nd.ni_vp, _PC_DEALLOC_PRESENT, &v); | ||||
if (error != 0) | if (error != 0) | ||||
goto bad; | goto bad; | ||||
if (v == 0) | if (v == 0) | ||||
sc->candelete = false; | sc->candelete = false; | ||||
▲ Show 20 Lines • Show All 724 Lines • Show Last 20 Lines |