Slight cleanup of code resurected for union mounts..
Submitted by: Tony Finch <dot@dotat.at>
This commit is contained in:
parent
dd2622a8cd
commit
cb11191c01
@ -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 @@ ogetdirentries(p, uap)
|
||||
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 @@ getdirentries(p, uap)
|
||||
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),
|
||||
|
@ -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 @@ ogetdirentries(p, uap)
|
||||
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 @@ getdirentries(p, uap)
|
||||
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),
|
||||
|
Loading…
Reference in New Issue
Block a user