Provable Diffusion Posterior Sampling for Bayesian Inversion