When getnewvnode() is called the vnode's v_type defaults to VNON. Syncer
vnodes are also set to VNON and any vnode that is accessed without locking
whos v_type is VNON is probably in the middle of being initialized. For
this reason the mountlist scan and vflush code typically ignores such
vnodes.
If a read error occurs while initializing a vnode, in particular if a hash
collision occurs or an I/O error occurs reading the inode, the vnode's
v_type was being left set to VNON. Explicitly set it to VBAD for msdosfs
and ufs (other FS's probably need the same treatment) so the flush and
reclaim code can reuse the vnode.
This fixes 'dangling vnode' panics on unmount for filesystems which incur
I/O errors, such as when one pulls a USB memory stick out while it is
still mounted.