diff --git a/module/os/freebsd/spl/spl_vfs.c b/module/os/freebsd/spl/spl_vfs.c index 991a11fe2..09c840126 100644 --- a/module/os/freebsd/spl/spl_vfs.c +++ b/module/os/freebsd/spl/spl_vfs.c @@ -240,9 +240,11 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath, #endif VI_LOCK(vp); vp->v_iflag &= ~VI_MOUNT; - VI_UNLOCK(vp); - +#ifdef VIRF_MOUNTPOINT + vn_irflag_set_locked(vp, VIRF_MOUNTPOINT); +#endif vp->v_mountedhere = mp; + VI_UNLOCK(vp); /* Put the new filesystem on the mount list. */ mtx_lock(&mountlist_mtx); TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list);