Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Apr 2022 23:27:46 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c4be460e84b4 - main - init_unrhdr(): make it usable by initializing everything
Message-ID:  <202204272327.23RNRkWF071759@gitrepo.freebsd.org>

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

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

commit c4be460e84b48f2c76e27768ee8132a1d639ebc2
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-04-20 21:58:22 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-04-27 23:27:34 +0000

    init_unrhdr(): make it usable by initializing everything
    
    Reviewed by:    markj
    Tested by:      pho
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D35014
---
 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?202204272327.23RNRkWF071759>