Skip to content

Commit 644f6bf

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
gfs2: gfs2_ail_empty_gl no log flush on error
Before this patch, function gfs2_ail_empty_gl called gfs2_log_flush even in cases where it encountered an error. It should probably skip the log flush and leave the file system in an inconsistent state, letting a subsequent withdraw force the journal to be replayed to reestablish metadata consistency. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent b97e583 commit 644f6bf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

fs/gfs2/glops.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ static int gfs2_ail_empty_gl(struct gfs2_glock *gl)
132132
gfs2_trans_end(sdp);
133133

134134
flush:
135-
gfs2_log_flush(sdp, NULL, GFS2_LOG_HEAD_FLUSH_NORMAL |
136-
GFS2_LFC_AIL_EMPTY_GL);
135+
if (!ret)
136+
gfs2_log_flush(sdp, NULL, GFS2_LOG_HEAD_FLUSH_NORMAL |
137+
GFS2_LFC_AIL_EMPTY_GL);
137138
return ret;
138139
}
139140

0 commit comments

Comments
 (0)