diff --git a/sys/kern/subr_sfbuf.c b/sys/kern/subr_sfbuf.c index cdf19da98dd9..707ace220639 100644 --- a/sys/kern/subr_sfbuf.c +++ b/sys/kern/subr_sfbuf.c @@ -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); }