]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Catch up to FreeBSD non-MPSAFE deorbit
authorBen Kaduk <kaduk@mit.edu>
Wed, 7 Nov 2012 15:08:33 +0000 (10:08 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Wed, 7 Nov 2012 19:14:06 +0000 (11:14 -0800)
All filesystems must have their own locking now.
We have been MPSAFE for quite some time, but the preprocessor macro
"MPSAFE" has been removed and we must catch up in order to compile.

The MNTK_MPSAFE macro has not yet been removed, but it is toothless
now, so we can preemptively stop using it.

Change-Id: I9d9090fd1afc020670a0cf874baacf483fd34915
Reviewed-on: http://gerrit.openafs.org/8366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/afs/FBSD/osi_misc.c
src/afs/FBSD/osi_vfsops.c
src/afs/FBSD/osi_vnodeops.c

index debc35474fc1890922c020bf323eb0ebc209ccf9..9dd1e11550fc8f4538883a6ba917256929d617c2 100644 (file)
@@ -31,7 +31,11 @@ osi_lookupname(char *aname, enum uio_seg seg, int followlink,
     if (glocked)
        AFS_GUNLOCK();
 
+#if __FreeBSD_version >= 1000021 /* MPSAFE is gone for good! */
+    flags = LOCKLEAF;
+#else
     flags = LOCKLEAF | MPSAFE; /* namei must take Giant if needed */
+#endif
     if (followlink)
        flags |= FOLLOW;
     else
index c2662632bccae06582cd86dc07db417979c70290..a1b5463672f001db58f81d715d0ee78ce5e2ed6d 100644 (file)
@@ -135,7 +135,9 @@ afs_omount(struct mount *mp, char *path, caddr_t data, struct nameidata *ndp,
 #if defined(AFS_FBSD61_ENV) && !defined(AFS_FBSD62_ENV)
     MNT_ILOCK(mp);
 #endif
+#if __FreeBSD_version < 1000021
     mp->mnt_kern_flag |= MNTK_MPSAFE; /* solid steel */
+#endif
 #ifndef AFS_FBSD61_ENV
     MNT_ILOCK(mp);
 #endif
index a9be0c32d569017526423b9bd9d4e16624b4dee9..124f711fa30aee1c7f1e00843fe3ff96837734d4 100644 (file)
@@ -501,7 +501,9 @@ afs_vop_lookup(ap)
     lockparent = flags & LOCKPARENT;
     wantparent = flags & (LOCKPARENT | WANTPARENT);
 
+#if __FreeBSD_version < 1000021
     cnp->cn_flags |= MPSAFE; /* steel */
+#endif
 
     if (flags & ISDOTDOT)
        MA_VOP_UNLOCK(dvp, 0, p);