[Midnightbsd-cvs] src [9332] trunk/sys/vm/vnode_pager.c: Assert that the object type for the vnode' non-NULL v_object, passed
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Mar 4 11:00:24 EST 2017
Revision: 9332
http://svnweb.midnightbsd.org/src/?rev=9332
Author: laffer1
Date: 2017-03-04 11:00:24 -0500 (Sat, 04 Mar 2017)
Log Message:
-----------
Assert that the object type for the vnode' non-NULL v_object, passed
to vnode_pager_setsize(), is either OBJT_VNODE, or, if vnode was
already reclaimed, OBJT_DEAD.
More, if the object is terminated, do not perform the resizing operation.
Modified Paths:
--------------
trunk/sys/vm/vnode_pager.c
Modified: trunk/sys/vm/vnode_pager.c
===================================================================
--- trunk/sys/vm/vnode_pager.c 2017-03-04 15:59:44 UTC (rev 9331)
+++ trunk/sys/vm/vnode_pager.c 2017-03-04 16:00:24 UTC (rev 9332)
@@ -380,6 +380,12 @@
return;
/* ASSERT_VOP_ELOCKED(vp, "vnode_pager_setsize and not locked vnode"); */
VM_OBJECT_LOCK(object);
+ if (object->type == OBJT_DEAD) {
+ VM_OBJECT_UNLOCK(object);
+ return;
+ }
+ KASSERT(object->type == OBJT_VNODE,
+ ("not vnode-backed object %p", object));
if (nsize == object->un_pager.vnp.vnp_size) {
/*
* Hasn't changed size
More information about the Midnightbsd-cvs
mailing list