Let ≥ 5 be prime, let m ≥ 1 be an integer, and let p(n) denote the partition function. Folsom, Kent, and Ono recently proved that there exists a positive integer b (m) of size roughly m 2 such that the module formed from the Z/ m Z-span of generating functions for p b n+1 24 with odd b ≥ b (m) has finite rank. The same result holds with "odd" b replaced by "even" b. Furthermore, they proved an upper bound on the ranks of these modules. This upper bound is independent of m; it is +12 24. In this paper, we prove, with a mild condition on , that b (m) ≤ 2m − 1. Our bound is sharp in all computed cases with ≥ 29. To deduce it, we prove structure theorems for the relevant Z/ m Z-modules of modular forms. This work sheds further light on a question of Mazur posed to Folsom, Kent, and Ono.