Let $\Omega \subset \mathbb R^d$ be a bounded connected open set with smooth boundary. Suppose $f \in L^1_{\text{loc}} (\Omega)$ is such that there exists some constant $C > 0$ such that for every $x \in \Omega$, and every open ball $B \subset \Omega$ containing $x$, we have

$$|f(x)| \leq \frac{C}{|B|} \left  |\int_{B} f \right |.$$

Is it true that $f \in L^\infty (\Omega)$ if and only if the above condition is satisfied?