+ if (error = iget(dp, ndp->ni_dent.d_ino, &tdp))
+ return (error);
+ /*
+ * If directory is "sticky", then user must own
+ * the directory, or the file in it, else she
+ * may not delete it (unless she's root). This
+ * implements append-only directories.
+ */
+ if ((dp->i_mode & ISVTX) &&
+ ndp->ni_cred->cr_uid != 0 &&
+ ndp->ni_cred->cr_uid != dp->i_uid &&
+ tdp->i_uid != ndp->ni_cred->cr_uid) {
+ iput(tdp);
+ return (EPERM);
+ }
+ ndp->ni_vp = ITOV(tdp);
+ if (!lockparent)
+ IUNLOCK(dp);