diff options
author | glebius <glebius@FreeBSD.org> | 2014-08-11 15:06:07 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-08-11 15:06:07 +0000 |
commit | 674240e02039a6feb14e2496e939c6cb80df9341 (patch) | |
tree | 5a8e6221b5a43be3cd7b8a59028f14a825528220 /sys/kern/subr_sfbuf.c | |
parent | b20344b2e91bf1c2d0f5e2a8bba517ac86e48975 (diff) | |
download | FreeBSD-src-674240e02039a6feb14e2496e939c6cb80df9341.zip FreeBSD-src-674240e02039a6feb14e2496e939c6cb80df9341.tar.gz |
Move KASSERT into locked region.
Submitted by: kib
Diffstat (limited to 'sys/kern/subr_sfbuf.c')
-rw-r--r-- | sys/kern/subr_sfbuf.c | 3 |
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); } |