Date: Mon, 28 Jul 2014 01:04:33 +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-10@freebsd.org Subject: svn commit: r269168 - stable/10/sys/fs/tmpfs Message-ID: <201407280104.s6S14XkL009975@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Jul 28 01:04:33 2014 New Revision: 269168 URL: http://svnweb.freebsd.org/changeset/base/269168 Log: MFC r268609: Add some assertions for the code handling vm_object for tmpfs vnode. Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c stable/10/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Mon Jul 28 01:01:20 2014 (r269167) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Mon Jul 28 01:04:33 2014 (r269168) @@ -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; Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vnops.c Mon Jul 28 01:01:20 2014 (r269167) +++ stable/10/sys/fs/tmpfs/tmpfs_vnops.c Mon Jul 28 01:04:33 2014 (r269168) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407280104.s6S14XkL009975>