diff options
author | Ian Moffett <ian@osmora.org> | 2024-05-01 21:59:57 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-05-01 21:59:57 -0400 |
commit | 51ad0de583015668df07b278ea4a8076e774b219 (patch) | |
tree | 8ef9bc5fc3912f6728bf92ae3faa300484caf49a | |
parent | c282dc146525a911044fea6cd5d851a742e9b342 (diff) |
kernel: vm_vnode: Ref the virtual memory object
Signed-off-by: Ian Moffett <ian@osmora.org>
-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; } |