diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 7e3f295cc37a..cef1a0f8460f 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -605,7 +605,9 @@ vop_stdcreatevobject(ap) * Dereference the reference we just created. This assumes * that the object is associated with the vp. */ + VM_OBJECT_LOCK(object); object->ref_count--; + VM_OBJECT_UNLOCK(object); vrele(vp); } else { if (object->flags & OBJ_DEAD) {