Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Feb 2018 08:55:23 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
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
Message-ID:  <201802190855.w1J8tNFn040630@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802190855.w1J8tNFn040630>