Move KASSERT into locked region.
Submitted by: kib
This commit is contained in:
parent
df3394b3de
commit
cd1692fa5d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=269813
@ -209,9 +209,8 @@ sf_buf_ref(struct sf_buf *sf)
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
KASSERT(sf->ref_count > 0, ("%s: sf %p not allocated", __func__, sf));
|
|
||||||
|
|
||||||
mtx_lock(&sf_buf_lock);
|
mtx_lock(&sf_buf_lock);
|
||||||
|
KASSERT(sf->ref_count > 0, ("%s: sf %p not allocated", __func__, sf));
|
||||||
sf->ref_count++;
|
sf->ref_count++;
|
||||||
mtx_unlock(&sf_buf_lock);
|
mtx_unlock(&sf_buf_lock);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user