summaryrefslogtreecommitdiffstats
path: root/sys/fs/specfs
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-05-19 01:28:09 +0000
committeralfred <alfred@FreeBSD.org>2001-05-19 01:28:09 +0000
commita3f0842419d98da211706f921fc626e160cd960b (patch)
treee86922a5639c32e1242d4f3088fc487f3be5b236 /sys/fs/specfs
parent9eda9187f024233436e6a743f13bd938b1a0f19c (diff)
downloadFreeBSD-src-a3f0842419d98da211706f921fc626e160cd960b.zip
FreeBSD-src-a3f0842419d98da211706f921fc626e160cd960b.tar.gz
Introduce a global lock for the vm subsystem (vm_mtx).
vm_mtx does not recurse and is required for most low level vm operations. faults can not be taken without holding Giant. Memory subsystems can now call the base page allocators safely. Almost all atomic ops were removed as they are covered under the vm mutex. Alpha and ia64 now need to catch up to i386's trap handlers. FFS and NFS have been tested, other filesystems will need minor changes (grabbing the vm lock when twiddling page properties). Reviewed (partially) by: jake, jhb
Diffstat (limited to 'sys/fs/specfs')
-rw-r--r--sys/fs/specfs/spec_vnops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index 2940f40..ba81229 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -731,6 +731,8 @@ spec_getpages(ap)
cnt.v_vnodein++;
cnt.v_vnodepgsin += pcount;
+ mtx_unlock(&vm_mtx);
+ mtx_lock(&Giant);
/* Do the input. */
BUF_STRATEGY(bp);
@@ -741,6 +743,8 @@ spec_getpages(ap)
tsleep(bp, PVM, "spread", 0);
splx(s);
+ mtx_unlock(&Giant);
+ mtx_lock(&vm_mtx);
if ((bp->b_ioflags & BIO_ERROR) != 0) {
if (bp->b_error)
OpenPOWER on IntegriCloud