The function create_conn_struct in msdfs.c calls smbd_vfs_init followed by vfs_ChDir. The vfs_ChDir call will usually fail on any VFS module (other than the default which talks to the local file system) because smbd_vfs_init only loads the module but does not establish a connection with the module (which is the job of SMB_VFS_CONNECTION). The SMB_VFS_CONNECTION call does not always come before the call to create_conn_struct in msdfs.c.