]> 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>
Thu, 8 Nov 2012 22:56:54 +0000 (14:56 -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.

Reviewed-on: http://gerrit.openafs.org/8366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit f749f17fe1a2bc56a8129f5579e5cf5009f12d95)

Change-Id: I35ad1c63bf3b1c91035bcdd29d7cfcb5603dfd12
Reviewed-on: http://gerrit.openafs.org/8374
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 04fe165a8fa50398ab6f2275c16609a5e32bf605..5fdd4612e6d4e62751a06ef1c187658de411c241 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 b300ff4d6045047b23732e7d8b2bc547fb06ee73..3311e94ae1752dcd8eec88b283aabf6d25f23b96 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 11d8cfee74dc3a2e9cf02695399a5896f4fb344f..01498fa8b2daeb4483c53b7d86ab105b4dc51c8c 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);