summaryrefslogtreecommitdiffstats
path: root/sys/vm/swap_pager.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/swap_pager.c')
-rw-r--r--sys/vm/swap_pager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 0fb5d22..997e682 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -1613,8 +1613,11 @@ swp_pager_async_iodone(bp)
* adjust pip. NOTE: the original parent may still have its own
* pip refs on the object.
*/
- if (object)
+ if (object != NULL) {
+ VM_OBJECT_LOCK(object);
vm_object_pip_wakeupn(object, bp->b_npages);
+ VM_OBJECT_UNLOCK(object);
+ }
/*
* release the physical I/O buffer
OpenPOWER on IntegriCloud