Expand the one-line function pbreassignbuf() the only place it is or could

be used.
This commit is contained in:
Poul-Henning Kamp 2002-05-05 20:37:08 +00:00
parent d08961bec3
commit 81e017430a
3 changed files with 1 additions and 16 deletions

View File

@ -1441,20 +1441,6 @@ pbrelvp(bp)
bp->b_flags &= ~B_PAGING;
}
/*
* 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

View File

@ -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 */

View File

@ -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;