aboutsummaryrefslogtreecommitdiff
path: root/sys/include/vm
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-25 17:51:54 -0400
committerIan Moffett <ian@osmora.org>2024-05-25 17:51:54 -0400
commitbd93d4966c5d78cb4ee2ab84d32890ea1ca77d53 (patch)
treebb8dc5e2a967679f288c3deed81a56af9a60f0c6 /sys/include/vm
parent32f395140a653e5c7e3e114faeb7314e223f0eea (diff)
kernel: vm: Make vmobj ref start at zero
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/vm')
-rw-r--r--sys/include/vm/obj.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/include/vm/obj.h b/sys/include/vm/obj.h
index e4258ac..6e24516 100644
--- a/sys/include/vm/obj.h
+++ b/sys/include/vm/obj.h
@@ -49,7 +49,7 @@ struct vm_object {
#define vm_object_ref(OBJPTR) (++(OBJPTR)->ref)
#define vm_object_unref(OBJPTR) do { \
- if ((OBJPTR)->ref > 1) { \
+ if ((OBJPTR)->ref > 0) { \
--(OBJPTR)->ref; \
} \
} while (0);