summaryrefslogtreecommitdiff
path: root/fs/gfs2/trans.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2020-06-05 22:12:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-23 11:46:33 +0300
commit9a81aa7adf2ecf5090a18e496b9e9b66f0e34a25 (patch)
tree06628b54eb2cf77b7a578595947c654d0e47b984 /fs/gfs2/trans.c
parent5f12fccbcc611adac9de8fc00c76dcae31a4a7d9 (diff)
downloadlinux-9a81aa7adf2ecf5090a18e496b9e9b66f0e34a25.tar.xz
gfs2: initialize transaction tr_ailX_lists earlier
commit cbcc89b630447ec7836aa2b9242d9bb1725f5a61 upstream. Since transactions may be freed shortly after they're created, before a log_flush occurs, we need to initialize their ail1 and ail2 lists earlier. Before this patch, the ail1 list was initialized in gfs2_log_flush(). This moves the initialization to the point when the transaction is first created. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Cc: Salvatore Bonaccorso <carnil@debian.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r--fs/gfs2/trans.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 69e3402a3cc5..3a9abc3aac82 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -56,6 +56,8 @@ int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks,
sizeof(u64));
INIT_LIST_HEAD(&tr->tr_databuf);
INIT_LIST_HEAD(&tr->tr_buf);
+ INIT_LIST_HEAD(&tr->tr_ail1_list);
+ INIT_LIST_HEAD(&tr->tr_ail2_list);
sb_start_intwrite(sdp->sd_vfs);