  Two Dehn surgeries on a knot are called cosmetic if they yield homeomorphic
three-manifolds. We show for a certain family of null-homologous knots in any
closed orientable three-manifold, if the knot admits cosmetic surgeries with a
pair of positive surgery coefficients, then the coefficients are both greater
than $1$. In addition, for this family of knots, we show that $1/q$ Dehn
surgery for $q$ at least $2$ is not homeomorphic to the original
three-manifold. The proofs of these results use the mapping cone formula for
the Heegaard Floer homology of Dehn surgery in terms of the knot Floer homology
of the knot; we provide a new proof of this formula for integer surgeries in
$\text{Spin}^c$ structures with nontorsion first Chern class.
