Date: Sun, 5 May 2013 06:32:13 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r250263 - stable/9/sys/vm Message-ID: <201305050632.r456WDUm047023@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun May 5 06:32:13 2013 New Revision: 250263 URL: http://svnweb.freebsd.org/changeset/base/250263 Log: MFC r250028: 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: stable/9/sys/vm/vnode_pager.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vnode_pager.c ============================================================================== --- stable/9/sys/vm/vnode_pager.c Sun May 5 06:25:28 2013 (r250262) +++ stable/9/sys/vm/vnode_pager.c Sun May 5 06:32:13 2013 (r250263) @@ -380,6 +380,12 @@ vnode_pager_setsize(vp, nsize) 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305050632.r456WDUm047023>