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:
Andriy Gapon 2016-07-13 15:16:51 +00:00
parent dde0f2bfd3
commit ac3623e090

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);