Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_pager.c
Show First 20 Lines • Show All 438 Lines • ▼ Show 20 Lines | |||||
pbgetvp(struct vnode *vp, struct buf *bp) | pbgetvp(struct vnode *vp, struct buf *bp) | ||||
{ | { | ||||
KASSERT(bp->b_vp == NULL, ("pbgetvp: not free")); | KASSERT(bp->b_vp == NULL, ("pbgetvp: not free")); | ||||
KASSERT(bp->b_bufobj == NULL, ("pbgetvp: not free (bufobj)")); | KASSERT(bp->b_bufobj == NULL, ("pbgetvp: not free (bufobj)")); | ||||
bp->b_vp = vp; | bp->b_vp = vp; | ||||
bp->b_flags |= B_PAGING; | bp->b_flags |= B_PAGING; | ||||
bp->b_bufobj = &vp->v_bufobj; | bp->b_bufobj = vp2bo(vp); | ||||
} | } | ||||
/* | /* | ||||
* Associate a p-buffer with a vnode. | * Associate a p-buffer with a vnode. | ||||
* | * | ||||
* Also sets B_PAGING flag to indicate that vnode is not fully associated | * Also sets B_PAGING flag to indicate that vnode is not fully associated | ||||
* with the buffer. i.e. the bp has not been linked into the vnode or | * with the buffer. i.e. the bp has not been linked into the vnode or | ||||
* ref-counted. | * ref-counted. | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |