Andreas Gruenbacher eed0f953b9 gfs2: Another gfs2_find_jhead fix
On filesystems with a block size smaller than the page size,
gfs2_find_jhead can split a page across two bios (for example, when
blocks are not allocated consecutively).  When that happens, the first
bio that completes will unlock the page in its bi_end_io handler even
though the page hasn't been read completely yet.  Fix that by using a
chained bio for the rest of the page.

While at it, clean up the sector calculation logic in
gfs2_log_alloc_bio.  In gfs2_find_jhead, simplify the disk block and
offset calculation logic and fix a variable name.

Fixes: f4686c26ecc3 ("gfs2: read journal in large chunks")
Cc: stable@vger.kernel.org # v5.2+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-01-07 12:30:36 +01:00
..
2019-09-27 15:10:34 -07:00
2019-11-30 10:57:22 -08:00
2019-09-19 09:42:37 -07:00
2019-07-12 17:37:53 -07:00
2019-11-11 09:21:59 -05:00
\n
2019-11-30 11:16:07 -08:00
2020-01-07 12:30:36 +01:00
2019-09-19 09:42:37 -07:00
2019-09-19 09:42:37 -07:00
2019-11-18 11:04:32 +01:00
2019-12-04 19:44:11 -08:00
2019-09-19 09:42:37 -07:00
2019-12-07 17:05:33 -08:00
2019-12-01 14:00:59 -08:00
2019-12-02 14:46:22 -08:00
2019-11-30 10:44:49 -08:00
2019-08-07 21:51:47 -04:00
2019-10-25 14:08:24 -04:00
2019-12-05 07:59:37 -07:00
2019-12-02 14:46:22 -08:00
2019-10-14 15:04:01 -07:00
2019-09-27 17:00:27 -07:00