Page MenuHomeFreeBSD

D45119.diff
No OneTemporary

D45119.diff

diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -183,6 +183,9 @@
KASSERT((object->flags & OBJ_ANON) == 0,
("%s: object %p with OBJ_ANON", __func__, object));
old = object->un_pager.swp.writemappings;
+ KASSERT(old >= (vm_ooffset_t)end - start,
+ ("tmpfs obj %p writecount %jx dec %jx", object, (uintmax_t)old,
+ (uintmax_t)((vm_ooffset_t)end - start)));
object->un_pager.swp.writemappings -= (vm_ooffset_t)end - start;
new = object->un_pager.swp.writemappings;
tmpfs_pager_writecount_recalc(object, old, new);
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -3158,6 +3158,10 @@
VM_OBJECT_WLOCK(object);
KASSERT((object->flags & OBJ_ANON) == 0,
("Splittable object with writecount"));
+ KASSERT(object->un_pager.swp.writemappings >= (vm_ooffset_t)end - start,
+ ("swap obj %p writecount %jx dec %jx", object,
+ (uintmax_t)object->un_pager.swp.writemappings,
+ (uintmax_t)((vm_ooffset_t)end - start)));
object->un_pager.swp.writemappings -= (vm_ooffset_t)end - start;
VM_OBJECT_WUNLOCK(object);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 8, 3:37 AM (9 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34828569
Default Alt Text
D45119.diff (1 KB)

Event Timeline