From 23252eeabe2b8e19d509f9ff49d995def75481ae Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 27 Jun 2003 18:52:49 +0000 Subject: [PATCH] Simple read-modify-write operations on a vm object's flags, ref_count, and shadow_count can now rely on its mutex for synchronization. Remove one use of Giant from vm_map_insert(). --- sys/vm/vm_map.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index ca8b79856a2b..642afbd4c669 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -821,14 +821,10 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_ooffset_t offset, * reference counting is insufficient to recognize * aliases with precision.) */ - if (object != kmem_object) - mtx_lock(&Giant); VM_OBJECT_LOCK(object); if (object->ref_count > 1 || object->shadow_count != 0) vm_object_clear_flag(object, OBJ_ONEMAPPING); VM_OBJECT_UNLOCK(object); - if (object != kmem_object) - mtx_unlock(&Giant); } else if ((prev_entry != &map->header) && (prev_entry->eflags == protoeflags) &&