Move KASSERT into locked region.

Submitted by:	kib
This commit is contained in:
Gleb Smirnoff 2014-08-11 15:06:07 +00:00
parent df3394b3de
commit cd1692fa5d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=269813

View File

@ -209,9 +209,8 @@ sf_buf_ref(struct sf_buf *sf)
return;
#endif
KASSERT(sf->ref_count > 0, ("%s: sf %p not allocated", __func__, sf));
mtx_lock(&sf_buf_lock);
KASSERT(sf->ref_count > 0, ("%s: sf %p not allocated", __func__, sf));
sf->ref_count++;
mtx_unlock(&sf_buf_lock);
}