summaryrefslogtreecommitdiffstats
path: root/sys/fs/tmpfs/tmpfs_subr.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-05-30 19:51:33 +0000
committerkib <kib@FreeBSD.org>2013-05-30 19:51:33 +0000
commitb94a58f986e2b9d65813231bfb1bed398f4d3f6a (patch)
treef22400cd7fecbc5c49c3a4d84035546dcdb76576 /sys/fs/tmpfs/tmpfs_subr.c
parent910939ccf3182ad800172a1b9068f0b1e2fae96b (diff)
downloadFreeBSD-src-b94a58f986e2b9d65813231bfb1bed398f4d3f6a.zip
FreeBSD-src-b94a58f986e2b9d65813231bfb1bed398f4d3f6a.tar.gz
Assert that OBJ_TMPFS flag on the vm object for the tmpfs node is
cleared when the tmpfs node is going away. Tested by: bdrewery, pho
Diffstat (limited to 'sys/fs/tmpfs/tmpfs_subr.c')
-rw-r--r--sys/fs/tmpfs/tmpfs_subr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index e751331..ed6bff0 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -314,6 +314,8 @@ tmpfs_free_node(struct tmpfs_mount *tmp, struct tmpfs_node *node)
TMPFS_LOCK(tmp);
tmp->tm_pages_used -= uobj->size;
TMPFS_UNLOCK(tmp);
+ KASSERT((uobj->flags & OBJ_TMPFS) == 0,
+ ("leaked OBJ_TMPFS node %p vm_obj %p", node, uobj));
vm_object_deallocate(uobj);
}
break;
OpenPOWER on IntegriCloud