DataInf: Efficiently Estimating Data Influence in LoRA-tuned LLMs and Diffusion Models