summaryrefslogtreecommitdiffstats
path: root/sys/fs/specfs/spec_vnops.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2001-07-04 16:20:28 +0000
committerdillon <dillon@FreeBSD.org>2001-07-04 16:20:28 +0000
commite028603b7e3e4fb35cdf00aab533f3965f4a13cc (patch)
tree7420cce169451a74c5b87963467a4aeff668ed12 /sys/fs/specfs/spec_vnops.c
parent0b028660051eb7abf4306d34e7fec0e7fde86a28 (diff)
downloadFreeBSD-src-e028603b7e3e4fb35cdf00aab533f3965f4a13cc.zip
FreeBSD-src-e028603b7e3e4fb35cdf00aab533f3965f4a13cc.tar.gz
With Alfred's permission, remove vm_mtx in favor of a fine-grained approach
(this commit is just the first stage). Also add various GIANT_ macros to formalize the removal of Giant, making it easy to test in a more piecemeal fashion. These macros will allow us to test fine-grained locks to a degree before removing Giant, and also after, and to remove Giant in a piecemeal fashion via sysctl's on those subsystems which the authors believe can operate without Giant.
Diffstat (limited to 'sys/fs/specfs/spec_vnops.c')
-rw-r--r--sys/fs/specfs/spec_vnops.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index 5ed07c0..f2b1c34 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -660,7 +660,8 @@ spec_getpages(ap)
int blksiz;
int gotreqpage;
- mtx_assert(&Giant, MA_OWNED);
+ GIANT_REQUIRED;
+
error = 0;
pcount = round_page(ap->a_count) / PAGE_SIZE;
@@ -732,7 +733,6 @@ spec_getpages(ap)
cnt.v_vnodein++;
cnt.v_vnodepgsin += pcount;
- mtx_unlock(&vm_mtx);
/* Do the input. */
BUF_STRATEGY(bp);
@@ -743,7 +743,6 @@ spec_getpages(ap)
tsleep(bp, PVM, "spread", 0);
splx(s);
- mtx_lock(&vm_mtx);
if ((bp->b_ioflags & BIO_ERROR) != 0) {
if (bp->b_error)
OpenPOWER on IntegriCloud