summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/lops.h
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2021-01-21 10:10:26 -0500
committerBob Peterson <rpeterso@redhat.com>2021-01-25 08:08:44 -0500
commit82218943058d5e3fe692a38b5a549479738dab33 (patch)
treeb61c5d35b664dc8c89c765cf50192da66b7213e7 /fs/gfs2/lops.h
parentf5f02fde9f52b2d769c1c2ddfd3d9c4a1fe739a7 (diff)
downloadlinux-82218943058d5e3fe692a38b5a549479738dab33.tar.gz
linux-82218943058d5e3fe692a38b5a549479738dab33.tar.bz2
linux-82218943058d5e3fe692a38b5a549479738dab33.zip
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>
Diffstat (limited to 'fs/gfs2/lops.h')
-rw-r--r--fs/gfs2/lops.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/lops.h b/fs/gfs2/lops.h
index 2280f68862de..9a85b9d7ad60 100644
--- a/fs/gfs2/lops.h
+++ b/fs/gfs2/lops.h
@@ -20,8 +20,9 @@
extern const struct gfs2_log_operations *gfs2_log_ops[];
extern void gfs2_log_incr_head(struct gfs2_sbd *sdp);
extern u64 gfs2_log_bmap(struct gfs2_jdesc *jd, unsigned int lbn);
-extern void gfs2_log_write(struct gfs2_sbd *sdp, struct page *page,
- unsigned size, unsigned offset, u64 blkno);
+extern void gfs2_log_write(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
+ struct page *page, unsigned size, unsigned offset,
+ u64 blkno);
extern void gfs2_log_submit_bio(struct bio **biop, int opf);
extern void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh);
extern int gfs2_find_jhead(struct gfs2_jdesc *jd,