summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_bio.c8
-rw-r--r--sys/vm/vm_object.c7
-rw-r--r--sys/vm/vm_object.h1
-rw-r--r--sys/vm/vm_page.c2
4 files changed, 5 insertions, 13 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 0e43072..410287a 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -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;
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index cacaafa..5572f2d 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -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);
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h
index b2f5641..5a3f3c7 100644
--- a/sys/vm/vm_object.h
+++ b/sys/vm/vm_object.h
@@ -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 */
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index f39bfb4..b36b1fa 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -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);
OpenPOWER on IntegriCloud