vfs: fix reference counting/locking on LK_UPGRADE error
Factoring out this code unfortunately introduced reference and lock leaks in
case of failure in the lock upgrade path under VV_CROSSLOCK. In terms of
practical use, this impacts unionfs (and nullfs in a corner case).
Fixes: 80bd5ef07025 ("vfs: factor out mount point traversal to a dedicated routine")
MFC after: 3 days
MFC to: stable/14 releng/14.0
Sponsored by: The FreeBSD Foundation
Reviewed by: mjg
[mjg: massaged the commit message a little bit]
Differential Revision: https://reviews.freebsd.org/D41731
Approved by: re (gjb)
(cherry picked from commit 02cbc029dac936b4ddbc38cef969c4b30c9a7d1f)
(cherry picked from commit c76dfb929e70c80a2d0280a1371c07738d910c11)