if ((dp->v_flag & VROOT) == 0 ||
(cnp->cn_flags & NOCROSSMOUNT))
break;
+ if (dp->v_mount == NULL) { /* forced umount */
+ error = EBADF;
+ goto bad;
+ }
+
tdp = dp;
dp = dp->v_mount->mnt_vnodecovered;
vput(tdp);
printf("not found\n");
#endif
if ((error == ENOENT) &&
- (dp->v_flag & VROOT) &&
+ (dp->v_flag & VROOT) && (dp->v_mount != NULL) &&
(dp->v_mount->mnt_flag & MNT_UNION)) {
tdp = dp;
dp = dp->v_mount->mnt_vnodecovered;
}
-#define NUMPARMS 7
+#define NUMPARMS 23
kdebug_lookup(dp, cnp)
struct vnode *dp;
{
register int i, n;
register int dbg_namelen;
+ register int save_dbg_namelen;
register char *dbg_nameptr;
long dbg_parms[NUMPARMS];
char dbg_buf[4];
if (dbg_namelen > sizeof(dbg_parms))
dbg_namelen = sizeof(dbg_parms);
dbg_nameptr -= dbg_namelen;
+ save_dbg_namelen = dbg_namelen;
i = 0;
else
dbg_parms[i++] = 0;
}
+
KERNEL_DEBUG_CONSTANT((FSDBG_CODE(DBG_FSRW,36)) | DBG_FUNC_NONE,
dp, dbg_parms[0], dbg_parms[1], dbg_parms[2], 0);
- KERNEL_DEBUG_CONSTANT((FSDBG_CODE(DBG_FSRW,36)) | DBG_FUNC_NONE,
- dbg_parms[3], dbg_parms[4], dbg_parms[5], dbg_parms[6], 0);
+
+ for (dbg_namelen = save_dbg_namelen-12, i=3;
+ dbg_namelen > 0;
+ dbg_namelen -=(4 * sizeof(long)))
+ {
+ KERNEL_DEBUG_CONSTANT((FSDBG_CODE(DBG_FSRW,36)) | DBG_FUNC_NONE,
+ dbg_parms[i++], dbg_parms[i++], dbg_parms[i++], dbg_parms[i++], 0);
+ }
}