Abhi Das 7582026f6f gfs2: fix gfs2_find_jhead that returns uninitialized jhead with seq 0
When the first log header in a journal happens to have a sequence
number of 0, a bug in gfs2_find_jhead() causes it to prematurely exit,
and return an uninitialized jhead with seq 0. This can cause failures
in the caller. For instance, a mount fails in one test case.

The correct behavior is for it to continue searching through the journal
to find the correct journal head with the highest sequence number.

Fixes: f4686c26ecc3 ("gfs2: read journal in large chunks")
Cc: stable@vger.kernel.org # v5.2+
Signed-off-by: Abhi Das <adas@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-02-06 17:35:23 +01:00
..
2019-07-03 14:45:18 +02:00
2019-12-05 13:20:11 -08:00
2019-12-05 13:20:11 -08:00
2020-01-20 08:46:53 +01:00
2019-09-04 20:22:17 +02:00
2019-09-03 09:42:41 +02:00
2019-06-08 12:52:42 -07:00
2020-01-21 11:19:45 +01:00
2019-09-18 22:47:05 -04:00
2019-11-14 19:46:18 +01:00
2019-11-14 19:46:18 +01:00
2019-11-14 19:46:18 +01:00