From: Jan-Simon Pendry Date: Sun, 11 Dec 1994 05:04:32 +0000 (-0800) Subject: fix readdir for non-linear union stacks X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/13f48dee70ec0b79753383e9734854a57464d8fa fix readdir for non-linear union stacks SCCS-vsn: sys/kern/vfs_syscalls.c 8.28 --- diff --git a/usr/src/sys/kern/vfs_syscalls.c b/usr/src/sys/kern/vfs_syscalls.c index b1dcf00404..4063304af6 100644 --- a/usr/src/sys/kern/vfs_syscalls.c +++ b/usr/src/sys/kern/vfs_syscalls.c @@ -9,7 +9,7 @@ * * %sccs.include.redist.c% * - * @(#)vfs_syscalls.c 8.27 (Berkeley) %G% + * @(#)vfs_syscalls.c 8.28 (Berkeley) %G% */ #include @@ -232,7 +232,6 @@ checkdirs(olddp) vrele(fdp->fd_cdir); VREF(newdp); fdp->fd_cdir = newdp; - printf("patch cdir for proc %d\n", p->p_pid); } if (fdp->fd_rdir == olddp) { vrele(fdp->fd_rdir); @@ -2121,13 +2120,13 @@ unionread: #ifdef UNION { extern int (**union_vnodeop_p)(); - extern struct vnode *union_lowervp __P((struct vnode *)); + extern struct vnode *union_dircache __P((struct vnode *)); if ((uap->count == auio.uio_resid) && (vp->v_op == union_vnodeop_p)) { struct vnode *lvp; - lvp = union_lowervp(vp); + lvp = union_dircache(vp); if (lvp != NULLVP) { struct vattr va; @@ -2137,13 +2136,12 @@ unionread: */ error = VOP_GETATTR(vp, &va, fp->f_cred, p); if (va.va_flags & OPAQUE) { - vrele(lvp); + vput(lvp); lvp = NULL; } } if (lvp != NULLVP) { - VOP_LOCK(lvp); error = VOP_OPEN(lvp, FREAD, fp->f_cred, p); VOP_UNLOCK(lvp); @@ -2228,13 +2226,13 @@ unionread: #ifdef UNION { extern int (**union_vnodeop_p)(); - extern struct vnode *union_lowervp __P((struct vnode *)); + extern struct vnode *union_dircache __P((struct vnode *)); if ((uap->count == auio.uio_resid) && (vp->v_op == union_vnodeop_p)) { struct vnode *lvp; - lvp = union_lowervp(vp); + lvp = union_dircache(vp); if (lvp != NULLVP) { struct vattr va; @@ -2244,13 +2242,12 @@ unionread: */ error = VOP_GETATTR(vp, &va, fp->f_cred, p); if (va.va_flags & OPAQUE) { - vrele(lvp); + vput(lvp); lvp = NULL; } } if (lvp != NULLVP) { - VOP_LOCK(lvp); error = VOP_OPEN(lvp, FREAD, fp->f_cred, p); VOP_UNLOCK(lvp);