From owner-svn-src-all@freebsd.org Mon Feb 19 08:55:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD3B7F102CD; Mon, 19 Feb 2018 08:55:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56ACA68310; Mon, 19 Feb 2018 08:55:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48A9118670; Mon, 19 Feb 2018 08:55:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1J8tN8o040631; Mon, 19 Feb 2018 08:55:23 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1J8tNFn040630; Mon, 19 Feb 2018 08:55:23 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201802190855.w1J8tNFn040630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Feb 2018 08:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329556 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 329556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Feb 2018 08:55:23 -0000 Author: avg Date: Mon Feb 19 08:55:22 2018 New Revision: 329556 URL: https://svnweb.freebsd.org/changeset/base/329556 Log: relax an assert in zfsctl_snapdir_lookup to match r323578 Since r323578 we may remove the last reference to a covered vnode with vrele() instead of vput(). So, v_usecount may be decremented before the vnode is locked and zfsctl_snapdir_lookup may "catch" the vnode with v_usecount of zero and v_holdcnt of one. PR: 225795 Reported by: asomers MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Mon Feb 19 06:11:58 2018 (r329555) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Mon Feb 19 08:55:22 2018 (r329556) @@ -980,7 +980,7 @@ zfsctl_snapdir_lookup(ap) * the mount point or the thread doing the mounting. * There can be more references from concurrent lookups. */ - KASSERT(vrefcnt(*vpp) > 1, ("found unreferenced mountpoint")); + KASSERT((*vpp)->v_holdcnt > 1, ("found unheld mountpoint")); /* * Check if a snapshot is already mounted on top of the vnode.