svn commit: r329556 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Mon Feb 19 08:55:23 UTC 2018


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.


More information about the svn-src-head mailing list