summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-03-17 12:03:42 +0000
committerjeff <jeff@FreeBSD.org>2005-03-17 12:03:42 +0000
commit92d24b8044e535eb473c6698795051f9ce495496 (patch)
tree5f1f88c2a2216611104f2c6a496305b0afdf8576 /sys
parent91796cd6d745c48b440f94ccb9e27bb868c18b33 (diff)
downloadFreeBSD-src-92d24b8044e535eb473c6698795051f9ce495496.zip
FreeBSD-src-92d24b8044e535eb473c6698795051f9ce495496.tar.gz
- Don't lock the vnode interlock in vm_object_set_writeable_dirty() if
we've already set the object flags. Reviewed by: alc
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_object.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 9adf836..7c23efa 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -1887,12 +1887,14 @@ vm_object_set_writeable_dirty(vm_object_t object)
struct vnode *vp;
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
+ if ((object->flags & (OBJ_MIGHTBEDIRTY|OBJ_WRITEABLE)) ==
+ (OBJ_MIGHTBEDIRTY|OBJ_WRITEABLE))
+ return;
vm_object_set_flag(object, OBJ_WRITEABLE|OBJ_MIGHTBEDIRTY);
if (object->type == OBJT_VNODE &&
(vp = (struct vnode *)object->handle) != NULL) {
VI_LOCK(vp);
- if ((vp->v_iflag & VI_OBJDIRTY) == 0)
- vp->v_iflag |= VI_OBJDIRTY;
+ vp->v_iflag |= VI_OBJDIRTY;
VI_UNLOCK(vp);
}
}
OpenPOWER on IntegriCloud