diff options
-rw-r--r-- | sys/adosfs/adlookup.c | 4 | ||||
-rw-r--r-- | sys/adosfs/adutil.c | 5 | ||||
-rw-r--r-- | sys/adosfs/advfsops.c | 8 | ||||
-rw-r--r-- | sys/adosfs/advnops.c | 12 |
4 files changed, 16 insertions, 13 deletions
diff --git a/sys/adosfs/adlookup.c b/sys/adosfs/adlookup.c index 2e6fa94d8de..1e6760cdb90 100644 --- a/sys/adosfs/adlookup.c +++ b/sys/adosfs/adlookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adlookup.c,v 1.8 1997/11/06 05:58:00 csapuntz Exp $ */ +/* $OpenBSD: adlookup.c,v 1.9 1997/11/06 17:23:08 csapuntz Exp $ */ /* $NetBSD: adlookup.c,v 1.17 1996/10/25 23:13:58 cgd Exp $ */ /* @@ -125,7 +125,7 @@ adosfs_lookup(v) if (error == 0 && lockp && last) error = vn_lock(vdp, LK_EXCLUSIVE | LK_RETRY, p); } else { - error = vget(*vpp, 1); + error = vget(*vpp, LK_EXCLUSIVE, p); /* if (lockp == 0 || error || last) */ if (lockp == 0 || error || last == 0) VOP_UNLOCK(vdp, 0, p); diff --git a/sys/adosfs/adutil.c b/sys/adosfs/adutil.c index a1dbd91df24..01caadd3dd7 100644 --- a/sys/adosfs/adutil.c +++ b/sys/adosfs/adutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adutil.c,v 1.8 1997/01/20 15:49:52 niklas Exp $ */ +/* $OpenBSD: adutil.c,v 1.9 1997/11/06 17:23:09 csapuntz Exp $ */ /* $NetBSD: adutil.c,v 1.15 1996/10/13 02:52:07 christos Exp $ */ /* @@ -56,6 +56,7 @@ adosfs_ahashget(mp, an) { struct anodechain *hp; struct anode *ap; + struct proc *p = curproc; hp = &VFSTOADOSFS(mp)->anodetab[AHASH(an)]; @@ -68,7 +69,7 @@ start_over: tsleep(ap, PINOD, "ahashget", 0); goto start_over; } - if (vget(ATOV(ap), 1)) + if (vget(ATOV(ap), LK_EXCLUSIVE, p)) goto start_over; return (ATOV(ap)); } diff --git a/sys/adosfs/advfsops.c b/sys/adosfs/advfsops.c index b831d4f48a6..fd4c5141800 100644 --- a/sys/adosfs/advfsops.c +++ b/sys/adosfs/advfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: advfsops.c,v 1.10 1997/11/06 05:58:01 csapuntz Exp $ */ +/* $OpenBSD: advfsops.c,v 1.11 1997/11/06 17:23:09 csapuntz Exp $ */ /* $NetBSD: advfsops.c,v 1.24 1996/12/22 10:10:12 cgd Exp $ */ /* @@ -224,7 +224,7 @@ adosfs_mountfs(devvp, mp, p) mp->mnt_stat.f_fsid.val[0] = (int32_t)devvp->v_rdev; mp->mnt_stat.f_fsid.val[1] = makefstype(MOUNT_ADOSFS); mp->mnt_flag |= MNT_LOCAL; - devvp->v_specflags |= SI_MOUNTEDON; + devvp->v_specmountpoint = mp; /* * init anode table. @@ -287,7 +287,7 @@ adosfs_unmount(mp, mntflags, p) if ((error = vflush(mp, NULLVP, flags)) != 0) return (error); amp = VFSTOADOSFS(mp); - amp->devvp->v_specflags &= ~SI_MOUNTEDON; + amp->devvp->v_specmountpoint = NULL; error = VOP_CLOSE(amp->devvp, FREAD, NOCRED, p); vrele(amp->devvp); if (amp->bitmap) @@ -738,13 +738,13 @@ adosfs_sync(mp, waitfor, uc, p) int adosfs_init(struct vfsconf *vfsp) { + return (0); } /* * vfs generic function call table */ struct vfsops adosfs_vfsops = { - MOUNT_ADOSFS, adosfs_mount, adosfs_start, adosfs_unmount, diff --git a/sys/adosfs/advnops.c b/sys/adosfs/advnops.c index 8335d59a549..006db0f076e 100644 --- a/sys/adosfs/advnops.c +++ b/sys/adosfs/advnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: advnops.c,v 1.9 1997/11/06 05:58:01 csapuntz Exp $ */ +/* $OpenBSD: advnops.c,v 1.10 1997/11/06 17:23:09 csapuntz Exp $ */ /* $NetBSD: advnops.c,v 1.32 1996/10/13 02:52:09 christos Exp $ */ /* @@ -736,8 +736,8 @@ adosfs_readdir(v) struct uio *a_uio; struct ucred *a_cred; int *a_eofflag; - u_long *a_cookies; - int a_ncookies; + u_long **a_cookies; + int *a_ncookies; } */ *sp = v; int error, useri, chainc, hashi, scanned, uavail; struct adirent ad, *adp; @@ -869,10 +869,12 @@ adosfs_readdir(v) error = uiomove((caddr_t)adp, sizeof(struct adirent), uio); if (error) break; +#ifdef FIXME_TO_HAVE_COOKIES if (sp->a_cookies) { *sp->a_cookies++ = (u_long)uoff; sp->a_ncookies--; } +#endif uoff += sizeof(struct adirent); useri++; uavail--; @@ -965,10 +967,10 @@ adosfs_inactive(v) advopprint(sp); #endif - VOP_UNLOCK(ap->a_vp, 0, ap->a_p); + VOP_UNLOCK(sp->a_vp, 0, sp->a_p); if (sp->a_vp->v_usecount == 0 /* && check for file gone? */) - vrecycle(sp->a_vp, (struct simplelock *)0, ap->a_p); + vrecycle(sp->a_vp, (struct simplelock *)0, sp->a_p); #ifdef ADOSFS_DIAGNOSTIC printf(" 0)"); |