The assert was meant as an additional check to the assert in link.c:198.
The reasoning behind the assert in link.c:198 is that once you've
obtained a write lock on a vmnt, you can't get an additional read lock
on the same vmnt. However, that does not always hold for the assert in
path.c:281 where the situation could be that you've obtained a read lock
and managed to get another read lock (this is possible). In other words,
the assert in path.c:281 is not the right place to check for that
situation.
symlink.l_vmnt_lock = VMNT_READ;
sym_vp = advance(res_vp, &symlink, rfp);
- /* Advance caused us to either switch to a different vmnt or we're
- * still at the same vmnt. The former might've yielded a new vmnt lock,
- * the latter should not have. Verify. */
- if (sym_vmp != NULL) {
- /* We got a vmnt lock, so the endpoints of the vnodes must
- * differ.
- */
- assert(sym_vp->v_fs_e != res_vp->v_fs_e);
- }
-
if (sym_vp != NULL && S_ISLNK(sym_vp->v_mode)) {
/* Last component is a symlink, but if we've been asked to not
* resolve it, return now.