summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2008-12-23 20:43:42 +0000
committermarcus <marcus@FreeBSD.org>2008-12-23 20:43:42 +0000
commit09a2776e693b4dac1f7a62f8e264ecf07bb78485 (patch)
treeca89b3ea85eadee980f640a337c25350d8e52c4f
parent174adf4f1e57526d8c5cee1b504632ecf2814887 (diff)
downloadFreeBSD-src-09a2776e693b4dac1f7a62f8e264ecf07bb78485.zip
FreeBSD-src-09a2776e693b4dac1f7a62f8e264ecf07bb78485.tar.gz
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
-rw-r--r--sys/kern/vfs_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index d3829c9..6fad06e 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -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];
OpenPOWER on IntegriCloud