diff options
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r-- | sys/kern/vfs_extattr.c | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 642dbd2..54dc30c 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $Id: vfs_syscalls.c,v 1.118 1999/02/25 15:54:06 bde Exp $ + * $Id: vfs_syscalls.c,v 1.119 1999/02/27 07:06:05 julian Exp $ */ /* For 4.3 integer FS ID compatibility */ @@ -2749,23 +2749,24 @@ unionread: 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)); @@ -2826,23 +2827,24 @@ unionread: 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), |