summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/subr_sfbuf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/subr_sfbuf.c b/sys/kern/subr_sfbuf.c
index cdf19da..707ace2 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);
}
OpenPOWER on IntegriCloud