diff options
author | alc <alc@FreeBSD.org> | 2003-05-18 22:02:51 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-05-18 22:02:51 +0000 |
commit | 57b29f0e87b1631dbe03dd10a364831bf201554b (patch) | |
tree | 4fb8a3b07003a27aefa4efc5255480b4abaad032 /sys/ufs | |
parent | 6ab7ac813b75e7b026c6dbbb8c2476705c6ebfb7 (diff) | |
download | FreeBSD-src-57b29f0e87b1631dbe03dd10a364831bf201554b.zip FreeBSD-src-57b29f0e87b1631dbe03dd10a364831bf201554b.tar.gz |
Lock the vm object when performing vm_object_page_clean().
Approved by: re (rwatson)
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_rawread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index 7e87293f..c32c9a6 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -122,8 +122,11 @@ ffs_rawread_sync(struct vnode *vp, struct thread *td) if ((vp->v_iflag & VI_OBJDIRTY) != 0) { struct vm_object *obj; VI_UNLOCK(vp); - if (VOP_GETVOBJECT(vp, &obj) == 0) + if (VOP_GETVOBJECT(vp, &obj) == 0) { + VM_OBJECT_LOCK(obj); vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); + VM_OBJECT_UNLOCK(obj); + } VI_LOCK(vp); } |