summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-05-18 07:48:06 +0000
committeralc <alc@FreeBSD.org>2002-05-18 07:48:06 +0000
commitb4282fb943cfd5a08b7f9baef013c294db04cee2 (patch)
treebeb8c14f2bcf2a2256cebc57c7a4acb680403ca3 /sys/vm/vm_object.c
parent10889ae6562cdd1e12fe30c413fca495aa709e22 (diff)
downloadFreeBSD-src-b4282fb943cfd5a08b7f9baef013c294db04cee2.zip
FreeBSD-src-b4282fb943cfd5a08b7f9baef013c294db04cee2.tar.gz
o Remove GIANT_REQUIRED from vm_map_madvise(). Instead, acquire and
release Giant around vm_map_madvise()'s call to pmap_object_init_pt(). o Replace GIANT_REQUIRED in vm_object_madvise() with the acquisition and release of Giant. o Remove the acquisition and release of Giant from madvise().
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 0db982e..373b16b 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -1002,10 +1002,11 @@ vm_object_madvise(vm_object_t object, vm_pindex_t pindex, int count, int advise)
vm_object_t tobject;
vm_page_t m;
- GIANT_REQUIRED;
if (object == NULL)
return;
+ mtx_lock(&Giant);
+
end = pindex + count;
/*
@@ -1093,6 +1094,7 @@ shadowlookup:
swap_pager_freespace(tobject, tpindex, 1);
}
}
+ mtx_unlock(&Giant);
}
/*
OpenPOWER on IntegriCloud