summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-07-27 11:59:57 +0000
committerrwatson <rwatson@FreeBSD.org>2007-07-27 11:59:57 +0000
commitc29e74320ba2271247571fc5ac01363963dcf016 (patch)
tree1d0bccf3909d0a0064cfcd777f148f0f6b272555 /sys/nfsserver
parent16ad7cce99fdefc348a2c705afbcdccf1057386f (diff)
downloadFreeBSD-src-c29e74320ba2271247571fc5ac01363963dcf016.zip
FreeBSD-src-c29e74320ba2271247571fc5ac01363963dcf016.tar.gz
First in a series of changes to remove the now-unused Giant compatibility
framework for non-MPSAFE network protocols: - Remove debug_mpsafenet variable, sysctl, and tunable. - Remove NET_NEEDS_GIANT() and associate SYSINITSs used by it to force debug.mpsafenet=0 if non-MPSAFE protocols are compiled into the kernel. - Remove logic to automatically flag interrupt handlers as non-MPSAFE if debug.mpsafenet is set for an INTR_TYPE_NET handler. - Remove logic to automatically flag netisr handlers as non-MPSAFE if debug.mpsafenet is set. - Remove references in a few subsystems, including NFS and Cronyx drivers, which keyed off debug_mpsafenet to determine various aspects of their own locking behavior. - Convert NET_LOCK_GIANT(), NET_UNLOCK_GIANT(), and NET_ASSERT_GIANT into no-op's, as their entire behavior was determined by the value in debug_mpsafenet. - Alias NET_CALLOUT_MPSAFE to CALLOUT_MPSAFE. Many remaining references to NET_.*_GIANT() and NET_CALLOUT_MPSAFE are still present in subsystems, and will be removed in followup commits. Reviewed by: bz, jhb Approved by: re (kensmith)
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs_srvsubs.c5
-rw-r--r--sys/nfsserver/nfs_syscalls.c10
2 files changed, 3 insertions, 12 deletions
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c
index 374bf26..33bde8a 100644
--- a/sys/nfsserver/nfs_srvsubs.c
+++ b/sys/nfsserver/nfs_srvsubs.c
@@ -549,10 +549,7 @@ nfsrv_modevent(module_t mod, int type, void *data)
nfsrv_initcache(); /* Init the server request cache */
NFSD_LOCK();
nfsrv_init(0); /* Init server data structures */
- if (debug_mpsafenet)
- callout_init(&nfsrv_callout, CALLOUT_MPSAFE);
- else
- callout_init(&nfsrv_callout, 0);
+ callout_init(&nfsrv_callout, CALLOUT_MPSAFE);
NFSD_UNLOCK();
nfsrv_timer(0);
diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c
index 4e0b468..ff31b98 100644
--- a/sys/nfsserver/nfs_syscalls.c
+++ b/sys/nfsserver/nfs_syscalls.c
@@ -561,16 +561,10 @@ nfssvc_nfsd(struct thread *td)
nfsd->nfsd_slp = NULL;
nfsrv_slpderef(slp);
}
- KASSERT(!(debug_mpsafenet == 0 && !mtx_owned(&Giant)),
- ("nfssvc_nfsd(): debug.mpsafenet=0 && !Giant"));
- KASSERT(!(debug_mpsafenet == 1 && mtx_owned(&Giant)),
- ("nfssvc_nfsd(): debug.mpsafenet=1 && Giant"));
+ mtx_assert(&Giant, MA_NOTOWNED);
}
done:
- KASSERT(!(debug_mpsafenet == 0 && !mtx_owned(&Giant)),
- ("nfssvc_nfsd(): debug.mpsafenet=0 && !Giant"));
- KASSERT(!(debug_mpsafenet == 1 && mtx_owned(&Giant)),
- ("nfssvc_nfsd(): debug.mpsafenet=1 && Giant"));
+ mtx_assert(&Giant, MA_NOTOWNED);
TAILQ_REMOVE(&nfsd_head, nfsd, nfsd_chain);
splx(s);
free((caddr_t)nfsd, M_NFSD);
OpenPOWER on IntegriCloud