+ } else {
+ if (dp->v_name == NULL || dp->v_parent == NULLVP) {
+ int isdot_or_dotdot;
+ int update_flags = 0;
+
+ isdot_or_dotdot = (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') || (cnp->cn_flags & ISDOTDOT);
+
+ if (isdot_or_dotdot == 0) {
+ if (dp->v_name == NULL)
+ update_flags |= VNODE_UPDATE_NAME;
+ if (ndp->ni_dvp != NULLVP && dp->v_parent == NULLVP)
+ update_flags |= VNODE_UPDATE_PARENT;
+
+ if (update_flags)
+ vnode_update_identity(dp, ndp->ni_dvp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_hash, update_flags);
+ }
+ }
+
+ if ( (cnp->cn_flags & MAKEENTRY) && (dp->v_flag & VNCACHEABLE) && LIST_FIRST(&dp->v_nclinks) == NULL) {
+ /*
+ * missing from name cache, but should
+ * be in it... this can happen if volfs
+ * causes the vnode to be created or the
+ * name cache entry got recycled but the
+ * vnode didn't...
+ * check to make sure that ni_dvp is valid
+ * cache_lookup_path may return a NULL
+ */
+ if (ndp->ni_dvp != NULL)
+ cache_enter(ndp->ni_dvp, dp, cnp);
+ }