Turn off the VTEXT flag when an object is no longer referenced, so
that an executable that is no longer running can be written to. Also, clear the OBJ_OPT flag more often, when appropriate.
This commit is contained in:
parent
19b7e28d58
commit
bf27292b35
@ -61,7 +61,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: vm_object.c,v 1.103 1997/12/29 00:24:49 dyson Exp $
|
||||
* $Id: vm_object.c,v 1.104 1998/01/06 05:26:04 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -246,7 +246,7 @@ vm_object_reference(object)
|
||||
vget((struct vnode *) object->handle, LK_NOOBJ, curproc);
|
||||
}
|
||||
|
||||
inline void
|
||||
void
|
||||
vm_object_vndeallocate(object)
|
||||
vm_object_t object;
|
||||
{
|
||||
@ -264,6 +264,8 @@ vm_object_vndeallocate(object)
|
||||
|
||||
object->ref_count--;
|
||||
if (object->type == OBJT_VNODE) {
|
||||
if (object->ref_count == 0)
|
||||
vp->v_flag &= ~VTEXT;
|
||||
vrele(vp);
|
||||
}
|
||||
}
|
||||
@ -366,6 +368,8 @@ vm_object_deallocate(object)
|
||||
if (temp) {
|
||||
TAILQ_REMOVE(&temp->shadow_head, object, shadow_list);
|
||||
temp->shadow_count--;
|
||||
if (temp->shadow_count == 0)
|
||||
temp->flags &= ~OBJ_OPT;
|
||||
}
|
||||
vm_object_terminate(object);
|
||||
/* unlocks and deallocates object */
|
||||
|
Loading…
Reference in New Issue
Block a user