  Neutron stars are known to have strong magnetic fields reaching as high as
$10^{15}$ Gauss, besides having strongly curved interior spacetime. So for
computing an equation of state for neutron-star matter, the effect of magnetic
field as well as curved spacetime should be taken into account. In this
article, we compute the equation of state for an ensemble of degenerate
fermions in the curved spacetime of a neutron star in presence of a magnetic
field. We show that the effect of curved spacetime on the equation of state is
relatively stronger than the effect of observed strengths of magnetic field.
Besides, a thin layer containing only spin-up neutrons is shown to form at the
boundary of a degenerate neutron star.
