We show that the operadic cohomology for any type of algebras over a non-symmetric operad A can be computed as Ext in the category of operadic A-modules. We use this principle to prove that theGerstenhaber-Schack diagram cohomology is operadic cohomology.