MFC the following revisions per request from gleb@:
r197953: Add locking around access to parent node, and bail out when
the parent node is already freed rather than panicking the system.
r227822: Avoid panics from recursive rename operations. Not a perfect
patch but good enough for now.
r232959: Don't enforce LK_RETRY to get existing vnode in
tmpfs_alloc_vp().
Doomed vnode is hardly of any use here, besides all callers handle error
case. vfs_hash_get() does the same.
Don't mess with vnode holdcount, vget() takes care of it already.
r232960: Prevent tmpfs_rename() deadlock in a way similar to UFS
Unlock vnodes and try to lock them one by one. Relookup fvp and tvp.
git-svn-id: svn://svn.freebsd.org/base/stable/8@238553
ccf9f872-aa2e-dd11-9fc8-
001c23d0bc1f