Add the witness warning for free_unr. Function could sleep, thus callers

shall not have any non-sleepable locks held.

Submitted by:	Hans Petter Selasky <hselasky c2i net>
Approved by:	re (kensmith)
This commit is contained in:
Konstantin Belousov 2007-06-19 13:13:17 +00:00
parent b76d072be1
commit 7550e3eac4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170949

View File

@ -714,6 +714,7 @@ free_unr(struct unrhdr *uh, u_int item)
{
void *p1, *p2;
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "free_unr");
p1 = Malloc(sizeof(struct unr));
p2 = Malloc(sizeof(struct unr));
mtx_lock(uh->mtx);