summaryrefslogtreecommitdiffstats
path: root/sys/vm/vnode_pager.c
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1997-02-10 02:22:35 +0000
committerdyson <dyson@FreeBSD.org>1997-02-10 02:22:35 +0000
commit10f666af84d48e89e4e2960415c9b616fce4077f (patch)
tree88a944de263165091f0a18abeedbaaccec532407 /sys/vm/vnode_pager.c
parent0960d7e91af3428ffba89b42228d82d8afaa0389 (diff)
downloadFreeBSD-src-10f666af84d48e89e4e2960415c9b616fce4077f.zip
FreeBSD-src-10f666af84d48e89e4e2960415c9b616fce4077f.tar.gz
This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
Diffstat (limited to 'sys/vm/vnode_pager.c')
-rw-r--r--sys/vm/vnode_pager.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index bf6a1c9..12e2f8c 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -329,6 +329,7 @@ void
vnode_pager_umount(mp)
register struct mount *mp;
{
+ struct proc *p = curproc; /* XXX */
struct vnode *vp, *nvp;
loop:
@@ -347,9 +348,9 @@ loop:
nvp = vp->v_mntvnodes.le_next;
if (vp->v_object != NULL) {
- VOP_LOCK(vp);
- vnode_pager_uncache(vp);
- VOP_UNLOCK(vp);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vnode_pager_uncache(vp, p);
+ VOP_UNLOCK(vp, 0, p);
}
}
}
@@ -364,8 +365,9 @@ loop:
* re-locking the vnode.
*/
void
-vnode_pager_uncache(vp)
+vnode_pager_uncache(vp, p)
struct vnode *vp;
+ struct proc *p;
{
vm_object_t object;
@@ -383,10 +385,10 @@ vnode_pager_uncache(vp)
* VBLK devices...
*/
if (vp->v_type != VBLK)
- VOP_UNLOCK(vp);
+ VOP_UNLOCK(vp, 0, p);
pager_cache(object, FALSE);
if (vp->v_type != VBLK)
- VOP_LOCK(vp);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
return;
}
@@ -968,11 +970,13 @@ struct vnode *
vnode_pager_lock(object)
vm_object_t object;
{
+ struct proc *p = curproc; /* XXX */
+
for (; object != NULL; object = object->backing_object) {
if (object->type != OBJT_VNODE)
continue;
- VOP_LOCK(object->handle);
+ vn_lock(object->handle, LK_EXCLUSIVE | LK_RETRY, p);
return object->handle;
}
return NULL;
OpenPOWER on IntegriCloud