- Don't lock the vnode interlock in vm_object_set_writeable_dirty() if
we've already set the object flags. Reviewed by: alc
This commit is contained in:
parent
91796cd6d7
commit
92d24b8044
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user