Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 May 2022 22:33:24 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 5ba023517911 - stable/13 - init_unrhdr(): make it usable by initializing everything
Message-ID:  <202205042233.244MXO8r015066@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=5ba0235179112641fe094d87e1169933abd6a049

commit 5ba0235179112641fe094d87e1169933abd6a049
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-04-20 21:58:22 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-05-04 22:33:05 +0000

    init_unrhdr(): make it usable by initializing everything
    
    (cherry picked from commit c4be460e84b48f2c76e27768ee8132a1d639ebc2)
---
 sys/kern/subr_unit.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c
index 7b4e22e1f27a..9ca67bcfe7a2 100644
--- a/sys/kern/subr_unit.c
+++ b/sys/kern/subr_unit.c
@@ -347,6 +347,8 @@ init_unrhdr(struct unrhdr *uh, int low, int high, struct mtx *mutex)
 	uh->high = high;
 	uh->first = 0;
 	uh->last = 1 + (high - low);
+	uh->busy = 0;
+	uh->alloc = 0;
 	check_unrhdr(uh, __LINE__);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205042233.244MXO8r015066>