Lines Matching refs:cnp

116 static int	ext2_is_dot_entry(struct componentname *cnp);
118 struct componentname *cnp, ino_t *dd_ino);
121 ext2_is_dot_entry(struct componentname *cnp)
123 if (cnp->cn_namelen <= 2 && cnp->cn_nameptr[0] == '.' &&
124 (cnp->cn_nameptr[1] == '.' || cnp->cn_nameptr[1] == '0'))
270 * The cnp->cn_nameiop argument is LOOKUP, CREATE, RENAME, or DELETE depending
302 ext2_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp,
320 struct ucred *cred = cnp->cn_cred;
321 int flags = cnp->cn_flags;
322 int nameiop = cnp->cn_nameiop;
353 ss.slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen);
356 cnp->cn_namelen + 3) &~ 3; */
365 if (!ext2_is_dot_entry(cnp) && ext2_htree_has_idx(dp)) {
368 switch (ext2_htree_lookup(dp, cnp->cn_nameptr, cnp->cn_namelen,
437 cnp->cn_nameptr, cnp->cn_namelen,
476 if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_thread)) != 0)
511 cnp->cn_flags |= SAVENAME;
517 if ((cnp->cn_flags & MAKEENTRY) && nameiop != CREATE)
518 cache_enter(vdp, NULL, cnp);
555 if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_thread)) != 0)
607 if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_thread)) != 0)
622 cnp->cn_flags |= SAVENAME;
649 error = vn_vget_ino(pdp, ino, cnp->cn_lkflags, &tdp);
662 error = ext2_lookup_ino(pdp, NULL, cnp, &ino1);
678 ltype = cnp->cn_lkflags & LK_TYPE_MASK;
687 if ((error = VFS_VGET(vdp->v_mount, ino, cnp->cn_lkflags,
696 if (cnp->cn_flags & MAKEENTRY)
697 cache_enter(vdp, *vpp, cnp);
862 ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp)
873 if ((cnp->cn_flags & SAVENAME) == 0)
878 newdir.e2d_namlen = cnp->cn_namelen;
884 bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1);
888 error = ext2_htree_add_entry(dvp, &newdir, cnp);
904 return ext2_htree_create_index(dvp, cnp, &newdir);
927 error = VOP_WRITE(dvp, &auio, IO_SYNC, cnp->cn_cred);
942 cnp->cn_cred, cnp->cn_thread);
1051 ext2_dirremove(struct vnode *dvp, struct componentname *cnp)
1099 ext2_dirrewrite(struct inode *dp, struct inode *ip, struct componentname *cnp)