svn commit: r322971 - head/sys/vm
Alan Cox
alc at FreeBSD.org
Mon Aug 28 17:02:26 UTC 2017
Author: alc
Date: Mon Aug 28 17:02:25 2017
New Revision: 322971
URL: https://svnweb.freebsd.org/changeset/base/322971
Log:
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
Modified:
head/sys/vm/swap_pager.c
Modified: head/sys/vm/swap_pager.c
==============================================================================
--- head/sys/vm/swap_pager.c Mon Aug 28 16:55:43 2017 (r322970)
+++ head/sys/vm/swap_pager.c Mon Aug 28 17:02:25 2017 (r322971)
@@ -1827,7 +1827,7 @@ swp_pager_meta_free(vm_object_t object, vm_pindex_t pi
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 pin
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)
More information about the svn-src-all
mailing list