summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2003-05-18 22:02:51 +0000
committerAlan Cox <alc@FreeBSD.org>2003-05-18 22:02:51 +0000
commit7f758dabbbf205c426f3f82c81245e306ecb294a (patch)
tree4fb8a3b07003a27aefa4efc5255480b4abaad032
parentd7a1c636e142fdfcd6ff029b44247c657f7465c6 (diff)
Notes
-rw-r--r--sys/ufs/ffs/ffs_rawread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c
index 7e87293f3095..c32c9a666952 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);
}