FBSD: osi_vcache: remove support for unsupported FreeBSD releases
authorGarrett Wollman <wollman@csail.mit.edu>
Wed, 13 Aug 2014 01:56:22 +0000 (21:56 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 25 Nov 2014 00:15:39 +0000 (19:15 -0500)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/afs/FBSD/osi_vcache.c

index 6d83702..0739d9c 100644 (file)
 #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) {