Given a fibered surface $X \rightarrow C$, with generic fiber $Y$ and a vector bundle $E$ on $X$.
Then the first Chern class $c_1(E)$ is a divisor on $X$, so one can restrict this divisor to the generic fiber $c_1(E)_{|Y}$.
On the other hand one can restrict $E$ to the generic fiber and look at its first Chern class as a divisor on $Y$, i.e. $c_1(E_{|Y})$.
Do we always have the equality $c_1(E)_{|Y}=c_1(E_{|Y})$ as divisors on $Y$, if $X$, $C$ and $Y$ are "nice" enough?