diff options
-rw-r--r-- | sys/vm/vm_vnode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_vnode.c b/sys/vm/vm_vnode.c index 707f7b4..e3d95ac 100644 --- a/sys/vm/vm_vnode.c +++ b/sys/vm/vm_vnode.c @@ -72,6 +72,7 @@ vn_pager_io(struct vm_object *obj, off_t off, size_t len, } spinlock_acquire(&obj->lock); + vm_object_ref(obj); dest = PHYS_TO_VIRT(pg->physaddr); /* Attempt to fetch the vnode */ @@ -95,6 +96,7 @@ vn_pager_io(struct vm_object *obj, off_t off, size_t len, goto done; } done: + vm_object_unref(obj); spinlock_release(&obj->lock); return res; } |