Metrics on torus without closed contractible geodesics It is easy to see that any closed geodesic on a flat 2-torus is noncontractible.
Further the same holds true for a torus of revolution.
Indeed either a closed geodesic is a meridian and therefore noncontractible, or it intersects all the meridians transversally and noncontractible as well.
The same argument shows that if a torus admits a geodesic foliation, then it has no contractible closed geodesic.
Are there other examples?

Are there examples of Riemannian metrics on $\mathbb{T}^2$ without closed null-homotopic geodesics and without a geodesic foliation?

A commnet of Dima Burago: It is impossible to find an example by taking a small perturbation of a flat metric. Indeed, by KAM theory any such perturbation has a geodesic foliation.
 A: This is a comment, not an answer, but it's too long to fit into a comment window.
I don't know of a 'generic' condition on metrics on the torus that would guarantee that there are no null-homotopic closed geodesics, but then I'm not sure what 'generic' is supposed to mean.  
For example, would it suffice to find some sort of 'open' condition (for example, that a metric be 'sufficiently close' in some appropriate sense to being flat) that would imply that there are no null-homotopic closed geodesics, or are we supposed to be trying to decide whether, given any metric on the torus, there is another metric arbitrarily 'close' to it that has no null-homotopic closed geodesics?  (This second meaning is what I take to be the literal meaning of 'generic', which I think is unlikely to hold.)
Meanwhile here is an interesting, 'nongeneric' example that has no nontrivial symmetries (which is, itself, a 'generic' condition in a sense) and has no null-homotopic closed geodesics:
Let $a$ and $b$ be 'generic' positive smooth functions on $\mathbb{R}$, periodic of period $2\pi$, and consider the metric
$$
g = \bigl(a(x)+b(y)\bigr)(\mathrm{d}x^2 + \mathrm{d}y^2).
$$
which is doubly periodic and hence defines a metric on the torus $\mathbb{T} = \mathbb{R}/(2\pi\mathbb{Z}^2)$.  
I will show that $g$ has no closed geodesics in $\mathbb{R}^2$.  
To do this, note that this is a metric of Liouville type and hence all the unit speed geodesics satisfy the equations (i.e., 'conservation laws' or 'first integrals')
$$
\bigl(a(x)+b(y)\bigr)(\dot x^2+\dot y^2) = 1
\quad\text{and}\quad 
\bigl(a(x)+b(y)\bigr)\bigl(b(y)\,\dot x^2 - a(x)\,\dot y^2) = c
$$
for some constant $c$.  Given such a geodesic, let $\theta$ be the function on the geodesic that satisfies $\cos\theta = \dot x\sqrt{a(x)+b(y)}$ and $\sin\theta = \dot y\sqrt{a(x)+b(y)}$.  This $\theta$ is well-defined up to an integer multiple of $2\pi$ and gives the 'slope' of the geodesic in the standard $xy$-coordinates.  Then we have
$$
b(y)\,\cos^2\theta - a(x)\,\sin^2\theta = c.
$$
Notice that, because $a$ and $b$ are strictly positive, this equation implies that, for any given $c$, there is an open set of directions $\phi$ such that $\theta$ cannot attain either value $\phi$ or $\phi+\pi$, an impossibility for a closed curve in the $xy$-plane, since a closed curve has to have a tangent perpendicular to any given direction.
Thus, $g$ has no closed geodesics in $\mathbb{R}^2$ and hence the induced metric on $\mathbb{T}$ has no closed null-homotopic geodesics.
Of course, you can object that Liouville metrics are not 'generic'. But it might be that there is some 'open' condition on a lattice-periodic metric on the plane such that no geodesic satisfying this condition can ever 'turn all the way around', as in this Liouville case.  If one can find such a condition, then this would, I take it, be an answer to Anton's question.
Moreover, there are `higher' Liouville metrics, i.e., for which the geodesic flow has higher degree polynomial conservation laws, and, as far as I know, there is no limit on how high the degree of such a conservation law might be.  It's possible that one could find examples of arbitrary complexity, so that these metrics are as 'generic' as you could possibly want.  
