diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-11-15 08:33:09 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-11-15 08:33:09 +0000 |
| commit | 287013d287af09180c7daf9e9db445ba6b754b37 (patch) | |
| tree | a46f918c039a7f65f5e7f5c4ef544ed4e33dd648 | |
| parent | d7fe1f51adbc8829189cb42fefe47f60b93f34f5 (diff) | |
Notes
| -rw-r--r-- | sys/vm/vm_pager.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c index deee6aec9fe0..a8d061a164eb 100644 --- a/sys/vm/vm_pager.c +++ b/sys/vm/vm_pager.c @@ -283,6 +283,8 @@ vm_pager_object_lookup(pg_list, handle) static void initpbuf(struct buf *bp) { + KASSERT(bp->b_bufobj == NULL, ("initpbuf with bufobj")); + KASSERT(bp->b_vp == NULL, ("initpbuf with vp")); bp->b_rcred = NOCRED; bp->b_wcred = NOCRED; bp->b_qindex = 0; /* On no queue (QUEUE_NONE) */ @@ -400,6 +402,9 @@ relpbuf(struct buf *bp, int *pfreecnt) bp->b_wcred = NOCRED; } + KASSERT(bp->b_vp == NULL, ("relpbuf with vp")); + KASSERT(bp->b_bufobj == NULL, ("relpbuf with bufobj")); + BUF_UNLOCK(bp); mtx_lock(&pbuf_mtx); @@ -429,6 +434,7 @@ pbgetvp(struct vnode *vp, struct buf *bp) { KASSERT(bp->b_vp == NULL, ("pbgetvp: not free")); + KASSERT(bp->b_bufobj == NULL, ("pbgetvp: not free (bufobj)")); bp->b_vp = vp; bp->b_flags |= B_PAGING; @@ -459,4 +465,3 @@ pbrelvp(struct buf *bp) bp->b_bufobj = NULL; bp->b_flags &= ~B_PAGING; } - |
