msdosfs_rename: Use the same locking algorithm for msdosfs_rename() as used by ufs_rename(). Convert doscheckpath() to non-sleeping version.
PR: 257522
msdosfs_rename: add a lock to ensure stability of the path check (ufs_checkpath and doscheckpath).
vfs_hash_insert: ensure that predicate is true
After vnode lock, recheck v_hash. When vfs_hash_insert() is used with a predicate, recheck it after the selected vnode is locked. Since vfs_hash_lock is dropped, vnode could be rehashed during the sleep for the vnode lock, which could go unnoticed there.
[The addition of the excl lock assert into vfs_hash_rehash()] is not going to be committed right now]
Tested by: pho
Per-commit view is available at https://kib.kiev.ua/git/gitweb.cgi?p=deviant3.git;a=shortlog;h=refs/heads/msdosfs_rename