1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-27 16:39:08 +00:00

o Use vm_object_lock() in place of Giant when manipulating a vm object

in vm_map_insert().
This commit is contained in:
Alan Cox 2002-08-24 17:52:08 +00:00
parent c97c8f4a3c
commit 4eaa117956
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102370

View File

@ -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 * process. We have to set or clear OBJ_ONEMAPPING
* appropriately. * appropriately.
*/ */
mtx_lock(&Giant); vm_object_lock(object);
if ((object->ref_count > 1) || (object->shadow_count != 0)) { if ((object->ref_count > 1) || (object->shadow_count != 0)) {
vm_object_clear_flag(object, OBJ_ONEMAPPING); vm_object_clear_flag(object, OBJ_ONEMAPPING);
} }
mtx_unlock(&Giant); vm_object_unlock(object);
} }
else if ((prev_entry != &map->header) && else if ((prev_entry != &map->header) &&
(prev_entry->eflags == protoeflags) && (prev_entry->eflags == protoeflags) &&