re-apply r299908: zfsctl_snapdir_lookup: clear VV_ROOT of snapshot's root

The change has been undone in r301275 on the assumption that it was no
longer required.  But that was incorrect, because in this case (and only
in this case) the snapshot root vnode is looked up before z_parent is
fixed up.

MFC after:	5 days
This commit is contained in:
avg 2016-07-13 15:16:51 +00:00
parent 000a3f0f8b
commit 41b594a6e0

View File

@ -1125,6 +1125,7 @@ zfsctl_snapdir_lookup(ap)
*/
ASSERT(VTOZ(*vpp)->z_zfsvfs != zfsvfs);
VTOZ(*vpp)->z_zfsvfs->z_parent = zfsvfs;
(*vpp)->v_flag &= ~VROOT;
}
ZFS_EXIT(zfsvfs);