Date: Sun, 3 Jul 2016 01:56:49 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302322 - head/sys/kern Message-ID: <201607030156.u631unVB010298@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun Jul 3 01:56:48 2016 New Revision: 302322 URL: https://svnweb.freebsd.org/changeset/base/302322 Log: Remove racy assert. The thread which changes vnode usecount from 0 to 1 does it under the vnode interlock, but the interlock is not owned by the asserting thread. As result, we might read increased use counter but also still see VI_OWEINACT. In collaboration with: nwhitehorn Hardware donated by: IBM LTC Sponsored by: The FreeBSD Foundation (kib) Approved by: re (gjb) Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Jul 3 01:35:27 2016 (r302321) +++ head/sys/kern/vfs_subr.c Sun Jul 3 01:56:48 2016 (r302322) @@ -2536,11 +2536,8 @@ vget(struct vnode *vp, int flags, struct * * Upgrade our holdcnt to a usecount. */ - if (vp->v_type != VCHR && - vfs_refcount_acquire_if_not_zero(&vp->v_usecount)) { - VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp, - ("vnode with usecount and VI_OWEINACT set")); - } else { + if (vp->v_type == VCHR || + !vfs_refcount_acquire_if_not_zero(&vp->v_usecount)) { VI_LOCK(vp); if ((vp->v_iflag & VI_OWEINACT) == 0) { oweinact = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607030156.u631unVB010298>