A common use of vfs_mountedon is to call it on device vnodes to determine if they are already associated with a file system. This is done to prevent multiple mounts on the same device.
error = vfs_mountedon(devvp); if (error) return (error);
... }