Any determination or declaration that the restriction is or is not enforceable, or is enforceable only in a certain manner or to a certain extent or for the benefit of certain land shall be in rem and operate directly upon the subject land, and be binding upon all persons entitled to enforce the restriction thereon. If the court determines that the restriction is enforceable only by award of money damages it shall, whether or not a violation has occurred, make such award, according to general rules of equity, and upon payment thereof determine that the land is free of the restriction.
Mass. Gen. Laws ch. 240, § 10C