Do not KASSERT when vp->v_dd is NULL. Only directories which have had ".."

looked up would have v_dd set to a non-NULL value.  This fixes a panic
seen when running installworld on a diskless system with a separate /usr
file system.

Submitted by:	cracauer
Approved by:	kib
This commit is contained in:
marcus 2008-12-23 20:43:42 +00:00
parent 174adf4f1e
commit 09a2776e69

View File

@ -936,7 +936,7 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir,
}
ncp = TAILQ_FIRST(&vp->v_cache_dst);
if (ncp != NULL) {
MPASS(ncp->nc_dvp == vp->v_dd);
MPASS(vp->v_dd == NULL || ncp->nc_dvp == vp->v_dd);
buflen -= ncp->nc_nlen - 1;
for (i = ncp->nc_nlen - 1; i >= 0 && bp != buf; i--)
*--bp = ncp->nc_name[i];