Julian Elischer <jul...@whistle.com> wrote: >On Fri, 26 Feb 1999, John Polstra wrote: >> Julian Elischer wrote: >> > you want to commit? >> > >> > (after you sir...) >> >> No, really, after you ... :-) > >Done >in 3.1 and 4
I just remembered that MNT_UNION occurs in another file which on investigation turned out to be amongst the unionfs code that was moved. It should be removed so that the code isn't run twice when unionfs is enabled. Sorry for missing it the first time round! I also tidied up the vfs_syscalls patch a bit. Tony. -- f.a.n.finch d...@dotat.at f...@demon.net --- miscfs/union/union_subr.c.3.1 Sat Feb 27 20:44:14 1999 +++ miscfs/union/union_subr.c Sat Feb 27 20:47:28 1999 @@ -1183,15 +1183,6 @@ return -1; /* goto unionread */ } } - if (((*vp)->v_flag & VROOT) && ((*vp)->v_mount->mnt_flag & MNT_UNION)) { - struct vnode *tvp = *vp; - *vp = (*vp)->v_mount->mnt_vnodecovered; - VREF(*vp); - fp->f_data = (caddr_t) *vp; - fp->f_offset = 0; - vrele(tvp); - return -1; /* goto unionread */ - } return error; } --- kern/vfs_syscalls.c.3.2 Sat Feb 27 20:55:32 1999 +++ kern/vfs_syscalls.c Sat Feb 27 21:00:26 1999 @@ -2756,23 +2756,24 @@ VOP_UNLOCK(vp, 0, p); if (error) return (error); - if (union_dircheckp && SCARG(uap, count) == auio.uio_resid) { - error = union_dircheckp(p, &vp, fp); - if (error == -1) + if (SCARG(uap, count) == auio.uio_resid) { + if (union_dircheckp) { + error = union_dircheckp(p, &vp, fp); + if (error == -1) + goto unionread; + if (error) + return (error); + } + if ((vp->v_flag & VROOT) && + (vp->v_mount->mnt_flag & MNT_UNION)) { + struct vnode *tvp = vp; + vp = vp->v_mount->mnt_vnodecovered; + VREF(vp); + fp->f_data = (caddr_t) vp; + fp->f_offset = 0; + vrele(tvp); goto unionread; - if (error) - return (error); - } - if ((SCARG(uap, count) == auio.uio_resid) && - (vp->v_flag & VROOT) && - (vp->v_mount->mnt_flag & MNT_UNION)) { - struct vnode *tvp = vp; - vp = vp->v_mount->mnt_vnodecovered; - VREF(vp); - fp->f_data = (caddr_t) vp; - fp->f_offset = 0; - vrele(tvp); - goto unionread; + } } error = copyout((caddr_t)&loff, (caddr_t)SCARG(uap, basep), sizeof(long)); @@ -2833,23 +2834,24 @@ VOP_UNLOCK(vp, 0, p); if (error) return (error); - if (union_dircheckp && SCARG(uap, count) == auio.uio_resid) { - error = union_dircheckp(p, &vp, fp); - if (error == -1) + if (SCARG(uap, count) == auio.uio_resid) { + if (union_dircheckp) { + error = union_dircheckp(p, &vp, fp); + if (error == -1) + goto unionread; + if (error) + return (error); + } + if ((vp->v_flag & VROOT) && + (vp->v_mount->mnt_flag & MNT_UNION)) { + struct vnode *tvp = vp; + vp = vp->v_mount->mnt_vnodecovered; + VREF(vp); + fp->f_data = (caddr_t) vp; + fp->f_offset = 0; + vrele(tvp); goto unionread; - if (error) - return (error); - } - if ((SCARG(uap, count) == auio.uio_resid) && - (vp->v_flag & VROOT) && - (vp->v_mount->mnt_flag & MNT_UNION)) { - struct vnode *tvp = vp; - vp = vp->v_mount->mnt_vnodecovered; - VREF(vp); - fp->f_data = (caddr_t) vp; - fp->f_offset = 0; - vrele(tvp); - goto unionread; + } } if (SCARG(uap, basep) != NULL) { error = copyout((caddr_t)&loff, (caddr_t)SCARG(uap, basep), To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message