summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/tmpfs/tmpfs_subr.c1
-rw-r--r--sys/fs/tmpfs/tmpfs_vnops.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index ed1a3ff..e08c244 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -428,6 +428,7 @@ void
tmpfs_destroy_vobject(struct vnode *vp, vm_object_t obj)
{
+ ASSERT_VOP_ELOCKED(vp, "tmpfs_destroy_vobject");
if (vp->v_type != VREG || obj == NULL)
return;
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
index 3586a28..8296ad10 100644
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -258,6 +258,8 @@ tmpfs_open(struct vop_open_args *v)
else {
error = 0;
/* For regular files, the call below is nop. */
+ KASSERT(vp->v_type != VREG || (node->tn_reg.tn_aobj->flags &
+ OBJ_DEAD) == 0, ("dead object"));
vnode_create_vobject(vp, node->tn_size, v->a_td);
}
OpenPOWER on IntegriCloud