[PATCH 5.15 193/247] md: protect md_unregister_thread from reentrancy