diff options
author | jeff <jeff@FreeBSD.org> | 2002-07-07 05:27:08 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-07-07 05:27:08 +0000 |
commit | 5d7805963eb441681bad7e5d38c517ef3cff8318 (patch) | |
tree | 8c2ff00b103f5f516a2de4d4b580f2a8845eb020 /sys/kern/vfs_bio.c | |
parent | 9b623ad295530eedaf3a602fd4550d92c7c235c9 (diff) | |
download | FreeBSD-src-5d7805963eb441681bad7e5d38c517ef3cff8318.zip FreeBSD-src-5d7805963eb441681bad7e5d38c517ef3cff8318.tar.gz |
Add two asserts that prove & document getblk and geteblk's behavior of
returning locked bufs.
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 6b284c8..f2696fe 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2435,6 +2435,7 @@ loop: splx(s); bp->b_flags &= ~B_DONE; } + KASSERT(BUF_REFCNT(bp) == 1, ("getblk: bp %p not locked",bp)); return (bp); } @@ -2456,6 +2457,7 @@ geteblk(int size) splx(s); allocbuf(bp, size); bp->b_flags |= B_INVAL; /* b_dep cleared by getnewbuf() */ + KASSERT(BUF_REFCNT(bp) == 1, ("geteblk: bp %p not locked",bp)); return (bp); } |