[PATCH 6.12 231/369] vdpa/mlx5: Fix needs_teardown flag calculation