opensolaris compat: clear VI_MOUNT before returning if mount_snapshot fails

To do: investigate if it would be possible to use normal vfs_domount here.

Reviewed by:	kib
MFC after:	19 days
This commit is contained in:
Andriy Gapon 2012-11-04 14:27:31 +00:00
parent 71900cfaf7
commit f8abf4a1e4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=242572

View File

@ -191,6 +191,9 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath,
td->td_ucred = cr;
if (error != 0) {
VI_LOCK(vp);
vp->v_iflag &= ~VI_MOUNT;
VI_UNLOCK(vp);
vrele(vp);
vfs_unbusy(mp);
vfs_mount_destroy(mp);