gfs2: keep bios separate for each journal
authorBob Peterson <rpeterso@redhat.com>
Thu, 21 Jan 2021 15:10:26 +0000 (10:10 -0500)
committerBob Peterson <rpeterso@redhat.com>
Mon, 25 Jan 2021 13:08:44 +0000 (08:08 -0500)
commit82218943058d5e3fe692a38b5a549479738dab33
treeb61c5d35b664dc8c89c765cf50192da66b7213e7
parentf5f02fde9f52b2d769c1c2ddfd3d9c4a1fe739a7
gfs2: keep bios separate for each journal

The recovery func can recover multiple journals, but they were all using
the same bio. This resulted in use-after-free related to sdp->sd_log_bio.
This patch moves the variable to the journal descriptor, jd, so that
every recovery can operate on its own bio. And hopefully we never run out.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/incore.h
fs/gfs2/log.c
fs/gfs2/lops.c
fs/gfs2/lops.h
fs/gfs2/recovery.c