From 4eaa1179563e682de9e5adfc240d1621dc1d5274 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 24 Aug 2002 17:52:08 +0000 Subject: [PATCH] o Use vm_object_lock() in place of Giant when manipulating a vm object in vm_map_insert(). --- sys/vm/vm_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index eccc09b5f45c..857514b07bac 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -764,11 +764,11 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_ooffset_t offset, * process. We have to set or clear OBJ_ONEMAPPING * appropriately. */ - mtx_lock(&Giant); + vm_object_lock(object); if ((object->ref_count > 1) || (object->shadow_count != 0)) { vm_object_clear_flag(object, OBJ_ONEMAPPING); } - mtx_unlock(&Giant); + vm_object_unlock(object); } else if ((prev_entry != &map->header) && (prev_entry->eflags == protoeflags) &&