Update a couple vm_object lock assertions in the swap pager to reflect the
new use of the vm_object's lock to synchronize updates to a radix trie mapping per-vm object page indices to on-disk swap blocks. Fix a typo in a nearby comment. Reviewed by: kib, markj X-MFC with: r322913 Differential Revision: https://reviews.freebsd.org/D12134
This commit is contained in:
parent
d5efa0a475
commit
ee620ea47d
@ -1827,7 +1827,7 @@ swp_pager_meta_free(vm_object_t object, vm_pindex_t pindex, vm_pindex_t count)
|
||||
int i;
|
||||
bool empty;
|
||||
|
||||
VM_OBJECT_ASSERT_LOCKED(object);
|
||||
VM_OBJECT_ASSERT_WLOCKED(object);
|
||||
if (object->type != OBJT_SWAP || count == 0)
|
||||
return;
|
||||
|
||||
@ -1909,9 +1909,13 @@ swp_pager_meta_ctl(vm_object_t object, vm_pindex_t pindex, int flags)
|
||||
daddr_t r1;
|
||||
int i;
|
||||
|
||||
VM_OBJECT_ASSERT_LOCKED(object);
|
||||
if ((flags & (SWM_FREE | SWM_POP)) != 0)
|
||||
VM_OBJECT_ASSERT_WLOCKED(object);
|
||||
else
|
||||
VM_OBJECT_ASSERT_LOCKED(object);
|
||||
|
||||
/*
|
||||
* The meta data only exists of the object is OBJT_SWAP
|
||||
* The meta data only exists if the object is OBJT_SWAP
|
||||
* and even then might not be allocated yet.
|
||||
*/
|
||||
if (object->type != OBJT_SWAP)
|
||||
|
Loading…
x
Reference in New Issue
Block a user