diff options
| -rw-r--r-- | sys/fs/unionfs/union_vnops.c | 10 | ||||
| -rw-r--r-- | sys/miscfs/union/union_vnops.c | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index f9c7702b2db8..3132dd107c53 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95 - * $Id: union_vnops.c,v 1.33 1997/05/03 01:55:19 kato Exp $ + * $Id: union_vnops.c,v 1.34 1997/05/07 14:37:32 kato Exp $ */ #include <sys/param.h> @@ -286,7 +286,9 @@ union_lookup(ap) /*if (uppervp == upperdvp) dun->un_flags |= UN_KLOCK;*/ - if (cnp->cn_consume != 0) { + if (cnp->cn_consume != 0 || uerror == EACCES) { + if (uerror == EACCES) + uppervp = NULLVP; *ap->a_vpp = uppervp; if (!lockparent) cnp->cn_flags &= ~LOCKPARENT; @@ -343,7 +345,9 @@ union_lookup(ap) if (lowervp != lowerdvp) VOP_UNLOCK(lowerdvp, 0, p); - if (cnp->cn_consume != 0) { + if (cnp->cn_consume != 0 || lerror == EACCES) { + if (lerror == EACCES) + lowervp = NULLVP; if (uppervp != NULLVP) { if (uppervp == upperdvp) vrele(uppervp); diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c index f9c7702b2db8..3132dd107c53 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.33 1997/05/03 01:55:19 kato Exp $ + * $Id: union_vnops.c,v 1.34 1997/05/07 14:37:32 kato Exp $ */ #include <sys/param.h> @@ -286,7 +286,9 @@ union_lookup(ap) /*if (uppervp == upperdvp) dun->un_flags |= UN_KLOCK;*/ - if (cnp->cn_consume != 0) { + if (cnp->cn_consume != 0 || uerror == EACCES) { + if (uerror == EACCES) + uppervp = NULLVP; *ap->a_vpp = uppervp; if (!lockparent) cnp->cn_flags &= ~LOCKPARENT; @@ -343,7 +345,9 @@ union_lookup(ap) if (lowervp != lowerdvp) VOP_UNLOCK(lowerdvp, 0, p); - if (cnp->cn_consume != 0) { + if (cnp->cn_consume != 0 || lerror == EACCES) { + if (lerror == EACCES) + lowervp = NULLVP; if (uppervp != NULLVP) { if (uppervp == upperdvp) vrele(uppervp); |
