diff options
author | kato <kato@FreeBSD.org> | 1997-08-15 02:36:28 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1997-08-15 02:36:28 +0000 |
commit | a629e89a7a525f5cd0673bdc7087d6d9626ba748 (patch) | |
tree | 083e82c951a14176be275dc0e3040a4349e97aa1 /sys/miscfs/union/union_vnops.c | |
parent | 8f18798bdfa9536300d60846b2d1a33afbc9c983 (diff) | |
download | FreeBSD-src-a629e89a7a525f5cd0673bdc7087d6d9626ba748.zip FreeBSD-src-a629e89a7a525f5cd0673bdc7087d6d9626ba748.tar.gz |
Added DIAGNOSTIC routine to test inconsistency of vnode when cnp
points `.'.
Obtained from: NetBSD
Diffstat (limited to 'sys/miscfs/union/union_vnops.c')
-rw-r--r-- | sys/miscfs/union/union_vnops.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c index c6b59f0..41ff607 100644 --- a/sys/miscfs/union/union_vnops.c +++ b/sys/miscfs/union/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95 - * $Id: union_vnops.c,v 1.36 1997/08/14 03:52:27 kato Exp $ + * $Id: union_vnops.c,v 1.37 1997/08/15 02:35:00 kato Exp $ */ #include <sys/param.h> @@ -438,6 +438,14 @@ union_lookup(ap) if (*ap->a_vpp != dvp) if (!lockparent || !(cnp->cn_flags & ISLASTCN)) VOP_UNLOCK(dvp, 0, p); +#ifdef DIAGNOSTIC + if (cnp->cn_namelen == 1 && + cnp->cn_nameptr[0] == '.' && + *ap->a_vpp != dvp) { + panic("union_lookup returning . (%p) not same as startdir (%p)", + ap->a_vpp, dvp); + } +#endif } return (error); |