From bd93d4966c5d78cb4ee2ab84d32890ea1ca77d53 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 25 May 2024 17:51:54 -0400 Subject: kernel: vm: Make vmobj ref start at zero Signed-off-by: Ian Moffett --- sys/include/vm/obj.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/include/vm') 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); -- cgit v1.2.3