Suppose that $(A,\mathfrak{m}_A)$ and $(B,\mathfrak{m}_B)$ are local rings and that $\varphi:A\rightarrow B$ is a local homomorphism (I am happy to assume that this morphism is quasifinite).
Let $M$ be a finitely generated $B$-module. This module naturally has the structure of an $A$-module, $am:=\varphi(a)m$. Thus, we can take the completion of $M$ with respect to two topologies: the one induced by $B$, with the filtration given by the $\mathfrak{m}_B^n M$, and the one induced by $A$, with the filtration given by the $\mathfrak{m}_A^n M$.
My question is when do this two topologies coincide. That is, if the completion of $M$ is independent of taking it with respect to $A$ or $B$.