diff options
author | Bob Peterson <rpeterso@redhat.com> | 2020-06-05 21:12:34 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2020-06-05 21:24:25 +0200 |
commit | cbcc89b630447ec7836aa2b9242d9bb1725f5a61 (patch) | |
tree | f9abdb29400b751e5c04902ddb37831c6fec5130 /fs/gfs2/glops.c | |
parent | gfs2: instrumentation wrt log_flush stuck (diff) | |
download | linux-cbcc89b630447ec7836aa2b9242d9bb1725f5a61.tar.xz linux-cbcc89b630447ec7836aa2b9242d9bb1725f5a61.zip |
gfs2: initialize transaction tr_ailX_lists earlier
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>
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r-- | fs/gfs2/glops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 4862dae868a2..224fb3bd503c 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -91,6 +91,8 @@ static int gfs2_ail_empty_gl(struct gfs2_glock *gl) memset(&tr, 0, sizeof(tr)); INIT_LIST_HEAD(&tr.tr_buf); INIT_LIST_HEAD(&tr.tr_databuf); + INIT_LIST_HEAD(&tr.tr_ail1_list); + INIT_LIST_HEAD(&tr.tr_ail2_list); tr.tr_revokes = atomic_read(&gl->gl_ail_count); if (!tr.tr_revokes) { |