fixup fsid correctly in union_getattr
[unix-history] / usr / src / sys / miscfs / union / union_vnops.c
index b658362..14d124b 100644 (file)
@@ -8,7 +8,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)union_vnops.c       8.14 (Berkeley) %G%
+ *     @(#)union_vnops.c       8.16 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -570,7 +570,7 @@ union_getattr(ap)
        if ((vap != ap->a_vap) && (vap->va_type == VDIR))
                ap->a_vap->va_nlink += vap->va_nlink;
 
        if ((vap != ap->a_vap) && (vap->va_type == VDIR))
                ap->a_vap->va_nlink += vap->va_nlink;
 
-       vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0];
+       ap->a_vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0];
        return (0);
 }
 
        return (0);
 }
 
@@ -1109,17 +1109,20 @@ union_readdir(ap)
                struct vnode *a_vp;
                struct uio *a_uio;
                struct ucred *a_cred;
                struct vnode *a_vp;
                struct uio *a_uio;
                struct ucred *a_cred;
+               int *a_eofflag;
+               u_long *a_cookies;
+               int a_ncookies;
        } */ *ap;
 {
        } */ *ap;
 {
-       int error = 0;
-       struct union_node *un = VTOUNION(ap->a_vp);
+       register struct union_node *un = VTOUNION(ap->a_vp);
+       register struct vnode *uvp = un->un_uppervp;
 
 
-       if (un->un_uppervp != NULLVP) {
-               FIXUP(un);
-               error = VOP_READDIR(un->un_uppervp, ap->a_uio, ap->a_cred);
-       }
+       if (uvp == NULLVP)
+               return (0);
 
 
-       return (error);
+       FIXUP(un);
+       ap->a_vp = uvp;
+       return (VOCALL(uvp->v_op, VOFFSET(vop_readdir), ap));
 }
 
 int
 }
 
 int