Author: avg
Date: Thu Feb 22 11:41:00 2018
New Revision: 329820

  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
--- 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)
-                * 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);
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to