Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Feb 2018 11:41:00 +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: r329820 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201802221141.w1MBf0dI046892@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Thu Feb 22 11:41:00 2018
New Revision: 329820
URL: https://svnweb.freebsd.org/changeset/base/329820

Log:
  followup to r329556, completely remove the covered vnode assert
  
  vrele() acquires the vnode lock only if the hold count drops to zero.
  In other scenarios it needs only the interlock.  So,
  zfsctl_snapdir_lookup() can race with vfs_mount_destroy() -> vrele()
  such that the lookup adds a new reference and then vrele() drops the
  mountpoint's reference and only then we check the reference count.
  It would be just one in this case.
  
  In fact, the assert should have been removed in r323483 when the code
  learned how to deal with the uncovered vnode.
  
  PR:		225795
  MFC after:	4 days
  X-MFC with:	r329556

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	Thu Feb 22 11:18:33 2018	(r329819)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c	Thu Feb 22 11:41:00 2018	(r329820)
@@ -976,13 +976,6 @@ zfsctl_snapdir_lookup(ap)
 			break;
 
 		/*
-		 * The vnode must be referenced at least by this thread and
-		 * the mount point or the thread doing the mounting.
-		 * There can be more references from concurrent lookups.
-		 */
-		KASSERT((*vpp)->v_holdcnt > 1, ("found unheld mountpoint"));
-
-		/*
 		 * Check if a snapshot is already mounted on top of the vnode.
 		 */
 		err = zfsctl_mounted_here(vpp, lkflags);



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