--- kernel/bsd/hfs/hfs_vfsutils.c 2018/04/24 18:26:05 1.1 +++ kernel/bsd/hfs/hfs_vfsutils.c 2018/04/24 18:30:56 1.1.1.2 @@ -792,7 +792,7 @@ short hfsGet( ExtendedVCB *vcb, hfsCatal Boolean unlockPar = false; /* Get the complex vnode, creating it if none existed */ - if (dvp->v_type == VCPLX) { + if ((dvp != NULL) && (dvp->v_type == VCPLX)) { cp = dvp; } else { @@ -816,7 +816,8 @@ short hfsGet( ExtendedVCB *vcb, hfsCatal fm = VTOH(cp)->h_meta; DBG_ASSERT(fm); /* Increment the usecount, to make sure it doesnt go away on us */ - fm->h_usecount++; + if (++fm->h_usecount == 0) + panic("hfsGet: h_usecount"); lockmgr(&fm->h_fmetalock, LK_EXCLUSIVE, (struct slock *)0, CURRENT_PROC); hp->h_relative = cp; if (forkType == kDataFork) /* Init downlink */