  Let $\Omega \subset \mathbb{R}^n$ be an unbounded open set. We consider the
generalized weighted Morrey spaces
$\mathcal{M}^{p(\cdot),\varphi}_{\omega}(\Omega)$ and the vanishing generalized
weighted Morrey spaces $V\mathcal{M}^{p(\cdot),\varphi}_{\omega}(\Omega)$ with
variable exponent $p(x)$ and a general function $\varphi(x,r)$ defining the
Morrey-type norm. The main result of this paper are the boundedness of Riesz
potential and its commutators on the spaces
$\mathcal{M}^{p(\cdot),\varphi}_{\omega}(\Omega)$ and
$V\mathcal{M}^{p(\cdot),\varphi}_{\omega}(\Omega)$. This result generalizes
several existing results for Riesz potential and its commutators on Morrey type
spaces. Especially, it gives a unified result for generalized Morrey spaces and
variable Morrey spaces which currently gained a lot of attentions from
researchers in theory of function spaces.
