From 5020d62430941b5ce79ce6a4fdb7a1d4f03cb13f Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 5 May 2002 20:37:08 +0000 Subject: Expand the one-line function pbreassignbuf() the only place it is or could be used. --- sys/kern/vfs_subr.c | 14 -------------- sys/sys/buf.h | 1 - sys/vm/vm_swap.c | 2 +- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index c7d5c54..6ec9007 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1442,20 +1442,6 @@ pbrelvp(bp) } /* - * Change the vnode a pager buffer is associated with. - */ -void -pbreassignbuf(bp, newvp) - struct buf *bp; - struct vnode *newvp; -{ - - KASSERT(bp->b_flags & B_PAGING, - ("pbreassignbuf() on non phys bp %p", bp)); - bp->b_vp = newvp; -} - -/* * Reassign a buffer from one vnode to another. * Used to assign file specific control information * (indirect blocks) to the vnode to which they belong. diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 0369060..3f0e259 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -499,7 +499,6 @@ void pbgetvp(struct vnode *, struct buf *); void pbrelvp(struct buf *); int allocbuf(struct buf *bp, int size); void reassignbuf(struct buf *, struct vnode *); -void pbreassignbuf(struct buf *, struct vnode *); struct buf *trypbuf(int *); #endif /* _KERNEL */ diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c index f1f2271..c953bff 100644 --- a/sys/vm/vm_swap.c +++ b/sys/vm/vm_swap.c @@ -150,7 +150,7 @@ swapdev_strategy(ap) } sp->sw_vp->v_numoutput++; } - pbreassignbuf(bp, sp->sw_vp); + bp->b_vp = sp->sw_vp; splx(s); BUF_STRATEGY(bp); return 0; -- cgit v1.1