diff options
author | jeff <jeff@FreeBSD.org> | 2005-03-17 12:03:42 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-03-17 12:03:42 +0000 |
commit | 92d24b8044e535eb473c6698795051f9ce495496 (patch) | |
tree | 5f1f88c2a2216611104f2c6a496305b0afdf8576 | |
parent | 91796cd6d745c48b440f94ccb9e27bb868c18b33 (diff) | |
download | FreeBSD-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
-rw-r--r-- | sys/vm/vm_object.c | 6 |
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); } } |