Lines Matching defs:cnp

205  * The cnp->cn_nameiop argument is LOOKUP, CREATE, RENAME, or DELETE depending
252 struct componentname *cnp = ap->a_cnp;
253 struct ucred *cred = cnp->cn_cred;
254 int flags = cnp->cn_flags;
255 int nameiop = cnp->cn_nameiop;
273 if ((error = VOP_ACCESS(vdp, VEXEC, cred, cnp->cn_proc)) != 0)
277 (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME))
287 if ((error = cache_lookup(vdp, vpp, cnp)) >= 0)
298 ss.slotneeded = EXT2FS_DIRSIZ(cnp->cn_namelen);
353 cnp, &entryoffsetinblock, &prevoff, &enduseful, &ss);
397 if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_proc)) != 0)
433 cnp->cn_flags |= SAVENAME;
436 cnp->cn_flags |= PDIRUNLOCK;
443 if ((cnp->cn_flags & MAKEENTRY) && nameiop != CREATE)
444 cache_enter(vdp, *vpp, cnp);
484 if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_proc)) != 0)
519 cnp->cn_flags |= PDIRUNLOCK;
531 if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_proc)) != 0)
542 cnp->cn_flags |= SAVENAME;
545 cnp->cn_flags |= PDIRUNLOCK;
572 cnp->cn_flags |= PDIRUNLOCK;
575 cnp->cn_flags &= ~PDIRUNLOCK;
583 cnp->cn_flags &= ~PDIRUNLOCK;
594 cnp->cn_flags |= PDIRUNLOCK;
602 if (cnp->cn_flags & MAKEENTRY)
603 cache_enter(vdp, *vpp, cnp);
609 struct componentname *cnp, int *entryoffsetinblockp,
675 if (namlen == cnp->cn_namelen &&
676 !memcmp(cnp->cn_nameptr, ep->e2d_name, namlen)) {
753 struct componentname *cnp)
768 if ((cnp->cn_flags & SAVENAME) == 0)
773 newdir.e2d_namlen = cnp->cn_namelen;
780 memcpy(newdir.e2d_name, cnp->cn_nameptr, (unsigned)cnp->cn_namelen + 1);
781 newentrysize = EXT2FS_DIRSIZ(cnp->cn_namelen);
801 error = VOP_WRITE(dvp, &auio, IO_SYNC, cnp->cn_cred);
883 cnp->cn_cred);
900 ext2fs_dirremove(struct vnode *dvp, struct componentname *cnp)
941 struct componentname *cnp)