Eliminate OBJ_WRITEABLE. It hasn't been used in a long time.
This commit is contained in:
parent
7e8041d356
commit
af51d7bf57
@ -2285,8 +2285,7 @@ vfs_setdirty(struct buf *bp)
|
||||
|
||||
/*
|
||||
* We qualify the scan for modified pages on whether the
|
||||
* object has been flushed yet. The OBJ_WRITEABLE flag
|
||||
* is not cleared simply by protecting pages off.
|
||||
* object has been flushed yet.
|
||||
*/
|
||||
|
||||
if ((bp->b_flags & B_VMIO) == 0)
|
||||
@ -2294,11 +2293,6 @@ vfs_setdirty(struct buf *bp)
|
||||
|
||||
object = bp->b_pages[0]->object;
|
||||
VM_OBJECT_LOCK(object);
|
||||
if ((object->flags & OBJ_WRITEABLE) && !(object->flags & OBJ_MIGHTBEDIRTY))
|
||||
printf("Warning: object %p writeable but not mightbedirty\n", object);
|
||||
if (!(object->flags & OBJ_WRITEABLE) && (object->flags & OBJ_MIGHTBEDIRTY))
|
||||
printf("Warning: object %p mightbedirty but not writeable\n", object);
|
||||
|
||||
if (object->flags & (OBJ_MIGHTBEDIRTY|OBJ_CLEANING)) {
|
||||
vm_offset_t boffset;
|
||||
vm_offset_t eoffset;
|
||||
|
@ -806,7 +806,7 @@ vm_object_page_clean(vm_object_t object, vm_pindex_t start, vm_pindex_t end, int
|
||||
if (clearobjflags && (tstart == 0) && (tend == object->size)) {
|
||||
struct vnode *vp;
|
||||
|
||||
vm_object_clear_flag(object, OBJ_WRITEABLE|OBJ_MIGHTBEDIRTY);
|
||||
vm_object_clear_flag(object, OBJ_MIGHTBEDIRTY);
|
||||
if (object->type == OBJT_VNODE &&
|
||||
(vp = (struct vnode *)object->handle) != NULL) {
|
||||
VI_LOCK(vp);
|
||||
@ -1920,10 +1920,9 @@ 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))
|
||||
if ((object->flags & OBJ_MIGHTBEDIRTY) != 0)
|
||||
return;
|
||||
vm_object_set_flag(object, OBJ_WRITEABLE|OBJ_MIGHTBEDIRTY);
|
||||
vm_object_set_flag(object, OBJ_MIGHTBEDIRTY);
|
||||
if (object->type == OBJT_VNODE &&
|
||||
(vp = (struct vnode *)object->handle) != NULL) {
|
||||
VI_LOCK(vp);
|
||||
|
@ -140,7 +140,6 @@ struct vm_object {
|
||||
#define OBJ_DEAD 0x0008 /* dead objects (during rundown) */
|
||||
#define OBJ_NOSPLIT 0x0010 /* dont split this object */
|
||||
#define OBJ_PIPWNT 0x0040 /* paging in progress wanted */
|
||||
#define OBJ_WRITEABLE 0x0080 /* object has been made writable */
|
||||
#define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty */
|
||||
#define OBJ_CLEANING 0x0200
|
||||
#define OBJ_ONEMAPPING 0x2000 /* One USE (a single, non-forked) mapping flag */
|
||||
|
@ -656,7 +656,7 @@ vm_page_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex)
|
||||
|
||||
/*
|
||||
* Since we are inserting a new and possibly dirty page,
|
||||
* update the object's OBJ_WRITEABLE and OBJ_MIGHTBEDIRTY flags.
|
||||
* update the object's OBJ_MIGHTBEDIRTY flag.
|
||||
*/
|
||||
if (m->flags & PG_WRITEABLE)
|
||||
vm_object_set_writeable_dirty(object);
|
||||
|
Loading…
Reference in New Issue
Block a user