dounmount: do not release the mount point's reference on the covered vnode
authoravg <avg@FreeBSD.org>
Thu, 14 Sep 2017 08:47:06 +0000 (08:47 +0000)
committeravg <avg@FreeBSD.org>
Thu, 14 Sep 2017 08:47:06 +0000 (08:47 +0000)
commitfa3c3c05d21c3653fd6673e763f0cbdb49c161a9
treeed6739c5772849f16722339683132de5440441fd
parentbc7f36b972dc65c3b7a83bd74a43e40fc4862882
dounmount: do not release the mount point's reference on the covered vnode

As long as mnt_ref is not zero there can be a consumer that might try
to access mnt_vnodecovered.  For this reason the covered vnode must not
be freed until mnt_ref goes to zero.
So, move the release of the covered vnode to vfs_mount_destroy.

Reviewed by: kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D12329
sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
sys/kern/vfs_mount.c