Lines Matching refs:ndp
140 vn_open(struct nameidata *ndp, int fmode, int cmode)
142 return(vn_open_modflags(ndp, &fmode, cmode));
146 vn_open_modflags(struct nameidata *ndp, int *fmodep, int cmode)
153 return(vn_open_auth(ndp, fmodep, &va));
158 * pointed to by ndp, fmodep, and vap as necessary to perform the requested
162 * Parameters: ndp The nami data pointer describing the
178 * The contents of '*ndp' will be modified, based on the other
202 vn_open_auth(struct nameidata *ndp, int *fmodep, struct vnode_attr *vap)
206 vfs_context_t ctx = ndp->ni_cnd.cn_context;
220 ndp->ni_cnd.cn_nameiop = CREATE;
222 ndp->ni_cnd.cn_flags &= USEDVP;
223 ndp->ni_cnd.cn_flags |= LOCKPARENT | LOCKLEAF | AUDITVNPATH1;
226 ndp->ni_cnd.cn_flags |= CN_ALLOWRSRCFORK;
229 ndp->ni_cnd.cn_flags |= FOLLOW;
230 if ( (error = namei(ndp)) )
232 dvp = ndp->ni_dvp;
233 vp = ndp->ni_vp;
246 dvp, &ndp->ni_cnd, vap);
258 if (ndp->ni_cnd.cn_flags & CN_WANTSRSRCFORK) {
259 if ((error = vnode_makenamedstream(dvp, &ndp->ni_vp, XATTR_RESOURCEFORK_NAME, 0, ctx)) != 0)
263 if ((error = vn_create(dvp, &ndp->ni_vp, &ndp->ni_cnd, vap, 0, ctx)) != 0)
266 vp = ndp->ni_vp;
278 vnode_update_identity(vp, dvp, ndp->ni_cnd.cn_nameptr, ndp->ni_cnd.cn_namelen, ndp->ni_cnd.cn_hash, update_flags);
295 nameidone(ndp);
296 ndp->ni_dvp = NULL;
310 nameidone(ndp);
311 ndp->ni_dvp = NULL;
321 ndp->ni_cnd.cn_nameiop = LOOKUP;
323 ndp->ni_cnd.cn_flags &= USEDVP;
324 ndp->ni_cnd.cn_flags |= FOLLOW | LOCKLEAF | AUDITVNPATH1;
327 ndp->ni_cnd.cn_flags |= CN_ALLOWRSRCFORK;
330 ndp->ni_cnd.cn_flags &= ~FOLLOW;
333 if ( (error = namei(ndp)) )
335 vp = ndp->ni_vp;
336 nameidone(ndp);
337 ndp->ni_dvp = NULL;
425 ndp->ni_vp = NULL;