o Replace GIANT_REQUIRED in swap_pager_alloc() by the acquisition and
release of Giant. (Annotate as MPSAFE.)
This commit is contained in:
parent
2a1618cd59
commit
24c46d036d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98607
@ -366,6 +366,8 @@ swap_pager_swap_init()
|
||||
* add because (I believe) it is not possible to attempt to create
|
||||
* a new swap object w/handle when a default object with that handle
|
||||
* already exists.
|
||||
*
|
||||
* MPSAFE
|
||||
*/
|
||||
static vm_object_t
|
||||
swap_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
|
||||
@ -373,8 +375,7 @@ swap_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
|
||||
{
|
||||
vm_object_t object;
|
||||
|
||||
GIANT_REQUIRED;
|
||||
|
||||
mtx_lock(&Giant);
|
||||
if (handle) {
|
||||
/*
|
||||
* Reference existing named region or allocate new one. There
|
||||
@ -401,7 +402,7 @@ swap_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
|
||||
|
||||
swp_pager_meta_build(object, 0, SWAPBLK_NONE);
|
||||
}
|
||||
|
||||
mtx_unlock(&Giant);
|
||||
return (object);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user