diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2019-09-12 16:26:59 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2019-09-12 16:26:59 +0000 |
commit | 11b57401e63962b792cff6f90744fa3471430dff (patch) | |
tree | c9c570a6b1caa193efdcff0905ac6701b874e5ba /sys/kern/vfs_bio.c | |
parent | 40617291e14612f20e9ed2173eff67c4c5c36dfe (diff) | |
download | src-11b57401e63962b792cff6f90744fa3471430dff.tar.gz src-11b57401e63962b792cff6f90744fa3471430dff.zip |
Use REFCOUNT_COUNT() to obtain refcount where appropriate.
Refcount waiting will set some flag bits in the refcount value.
Make sure these bits get cleared by using the REFCOUNT_COUNT()
macro to obtain the actual refcount.
Differential Revision: https://reviews.freebsd.org/D21620
Reviewed by: kib@, markj@
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes
Notes:
svn path=/head/; revision=352253
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 22801b5fe1a8..940b27665600 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kthread.h> #include <sys/proc.h> #include <sys/racct.h> +#include <sys/refcount.h> #include <sys/resourcevar.h> #include <sys/rwlock.h> #include <sys/smp.h> @@ -2842,9 +2843,9 @@ vfs_vmio_iodone(struct buf *bp) bool bogus; obj = bp->b_bufobj->bo_object; - KASSERT(obj->paging_in_progress >= bp->b_npages, + KASSERT(REFCOUNT_COUNT(obj->paging_in_progress) >= bp->b_npages, ("vfs_vmio_iodone: paging in progress(%d) < b_npages(%d)", - obj->paging_in_progress, bp->b_npages)); + REFCOUNT_COUNT(obj->paging_in_progress), bp->b_npages)); vp = bp->b_vp; KASSERT(vp->v_holdcnt > 0, |