From 744a0e6df11ceefde0885a2ab737a8e689762d53 Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Tue, 12 Aug 2014 21:56:22 -0400 Subject: [PATCH] FBSD: osi_vcache: remove support for unsupported FreeBSD releases Support for FreeBSD 7.x terminated in early 2013, and it's highly unlikely that anyone was successfully using OpenAFS in that environment. OpenAFS has not been tested on 7.x since at least that time, probably longer. This removes the #ifdefs that support pre-8.0 releases. Change-Id: I01cbce2d98f02755b170df34d948a94525df3853 Reviewed-on: http://gerrit.openafs.org/11382 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- src/afs/FBSD/osi_vcache.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/src/afs/FBSD/osi_vcache.c b/src/afs/FBSD/osi_vcache.c index 6d837028e..0739d9ce2 100644 --- a/src/afs/FBSD/osi_vcache.c +++ b/src/afs/FBSD/osi_vcache.c @@ -13,16 +13,6 @@ #include "afs/sysincludes.h" /*Standard vendor system headers */ #include "afsincludes.h" /*AFS-based standard headers */ -#if defined(AFS_FBSD80_ENV) -#define ma_vn_lock(vp, flags, p) (vn_lock(vp, flags)) -#define MA_VOP_LOCK(vp, flags, p) (VOP_LOCK(vp, flags)) -#define MA_VOP_UNLOCK(vp, flags, p) (VOP_UNLOCK(vp, flags)) -#else -#define ma_vn_lock(vp, flags, p) (vn_lock(vp, flags, p)) -#define MA_VOP_LOCK(vp, flags, p) (VOP_LOCK(vp, flags, p)) -#define MA_VOP_UNLOCK(vp, flags, p) (VOP_UNLOCK(vp, flags, p)) -#endif - int osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep) { @@ -50,9 +40,9 @@ osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep) AFS_GUNLOCK(); *slept = 1; /* use the interlock while locking, so no one else can DOOM this */ - ma_vn_lock(vp, LK_INTERLOCK|LK_EXCLUSIVE|LK_RETRY, curthread); + vn_lock(vp, LK_INTERLOCK|LK_EXCLUSIVE|LK_RETRY); vgone(vp); - MA_VOP_UNLOCK(vp, 0, curthread); + VOP_UNLOCK(vp, 0); vdrop(vp); AFS_GLOCK(); @@ -77,26 +67,17 @@ osi_PrePopulateVCache(struct vcache *avc) { void osi_AttachVnode(struct vcache *avc, int seq) { struct vnode *vp; -#if !defined(AFS_FBSD80_ENV) - struct thread *p = curthread; -#endif ReleaseWriteLock(&afs_xvcache); AFS_GUNLOCK(); -#if defined(AFS_FBSD60_ENV) if (getnewvnode(MOUNT_AFS, afs_globalVFS, &afs_vnodeops, &vp)) -#else - if (getnewvnode(MOUNT_AFS, afs_globalVFS, afs_vnodeop_p, &vp)) -#endif panic("afs getnewvnode"); /* can't happen */ -#ifdef AFS_FBSD70_ENV /* XXX verified on 80--TODO check on 7x */ if (!vp->v_mount) { - ma_vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); /* !glocked */ + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); /* !glocked */ insmntque(vp, afs_globalVFS); - MA_VOP_UNLOCK(vp, 0, p); + VOP_UNLOCK(vp, 0); } -#endif AFS_GLOCK(); ObtainWriteLock(&afs_xvcache,339); if (avc->v != NULL) { -- 2.39.5