diff --git a/src/afs/OBSD/osi_machdep.h b/src/afs/OBSD/osi_machdep.h index 1cb9d781ae..68acc513ed 100644 --- a/src/afs/OBSD/osi_machdep.h +++ b/src/afs/OBSD/osi_machdep.h @@ -42,9 +42,8 @@ extern struct simplelock afs_rxglobal_lock; /* vnode */ #define SetAfsVnode(vn) /* nothing; done in getnewvnode() */ #define IsAfsVnode(vn) ((vn)->v_op == afs_vnodeop_p) -#define AFS_HOLD(vp) afs_nbsd_ref(vp) -#define AFS_RELE(vp) afs_nbsd_rele(vp) -#define VN_HOLD(vp) afs_vget((vp), 0) +#define VN_HOLD(vp) VREF(vp) +#define VN_RELE(vp) vrele(vp) #define osi_vnhold(avc, r) afs_vget(AFSTOV(avc), 0) #define va_nodeid va_fileid #define vnode_t struct vnode @@ -106,8 +105,6 @@ extern int afs_nbsd_lookupname(char *fnamep, enum uio_seg segflg, int followlink, struct vnode **dirvpp, struct vnode **compvpp); extern void afs_nbsd_getnewvnode(struct vcache *tvc); -extern void afs_nbsd_ref(struct vnode *); -extern void afs_nbsd_rele(struct vnode *); extern void *afs_nbsd_Alloc(size_t asize); extern void afs_nbsd_Free(void *p, size_t asize); extern int afs_vget(); diff --git a/src/afs/OBSD/osi_vfsops.c b/src/afs/OBSD/osi_vfsops.c index 6828212c24..4f6610f8dd 100644 --- a/src/afs/OBSD/osi_vfsops.c +++ b/src/afs/OBSD/osi_vfsops.c @@ -346,7 +346,7 @@ afs_root(struct mount *mp, struct vnode **vpp) AFS_RELE(AFSTOV(afs_globalVp)); #endif afs_globalVp = tvp; - AFS_HOLD(AFSTOV(afs_globalVp)); + VREF(AFSTOV(afs_globalVp)); } AFSTOV(tvp)->v_flag |= VROOT; afs_globalVFS = mp; @@ -391,28 +391,6 @@ afs_sync(struct osi_vfs *afsp) return 0; } -void -afs_nbsd_ref(struct vnode *vp) -{ - if (vp->v_usecount == 0) { - vprint("holding unheld node", vp); - panic("afs_ref"); - } - VREF(vp); -} - -void -afs_nbsd_rele(struct vnode *vp) -{ - AFS_GUNLOCK(); - if (vp->v_usecount <= 0) { - vprint("rele'ing unheld node", vp); - panic("afs_rele"); - } - vrele(vp); - AFS_GLOCK(); -} - int afs_vget(vp, lfl) struct vnode *vp; diff --git a/src/afs/OBSD/osi_vnodeops.c b/src/afs/OBSD/osi_vnodeops.c index 4715adfb4b..0b62291eb4 100644 --- a/src/afs/OBSD/osi_vnodeops.c +++ b/src/afs/OBSD/osi_vnodeops.c @@ -212,11 +212,6 @@ struct vnodeopv_desc afs_vnodeop_opv_desc = int afs_debug; -#undef vrele -#define vrele afs_nbsd_rele -#undef VREF -#define VREF afs_nbsd_ref - int afs_nbsd_lookup(ap) struct vop_lookup_args /* { diff --git a/src/afs/afs_daemons.c b/src/afs/afs_daemons.c index 849d4469cc..658bd4a154 100644 --- a/src/afs/afs_daemons.c +++ b/src/afs/afs_daemons.c @@ -575,12 +575,8 @@ afs_BQueue(register short aopcode, register struct vcache *avc, if (avc) { #ifdef AFS_DEC_ENV avc->vrefCount++; -#else -#if defined(AFS_NETBSD_ENV) || defined(AFS_OBSD_ENV) - AFS_HOLD(AFSTOV(avc)); #else VN_HOLD(AFSTOV(avc)); -#endif #endif } tb->refCount = ause + 1; diff --git a/src/afs/afs_osi.h b/src/afs/afs_osi.h index d34b03d630..a573e89780 100644 --- a/src/afs/afs_osi.h +++ b/src/afs/afs_osi.h @@ -247,7 +247,6 @@ typedef struct timeval osi_timeval_t; #define USERPRI #endif -#ifndef AFS_OBSD_ENV /* * vnode/vcache ref count manipulation */ @@ -256,7 +255,6 @@ typedef struct timeval osi_timeval_t; #else /* defined(UKERNEL) */ #define AFS_RELE(vp) do { AFS_GUNLOCK(); VN_RELE(vp); AFS_GLOCK(); } while (0) #endif /* defined(UKERNEL) */ -#endif /* * For some reason we do bare refcount manipulation in some places, for some