summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/log.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2020-01-23 18:41:00 +0100
committerBob Peterson <rpeterso@redhat.com>2020-02-10 07:39:44 -0600
commitbadb55ec208adc4c406ed084f486deb1f9f5baa0 (patch)
treed946a301faa71122d9a220802cf66da16cb849b7 /fs/gfs2/log.c
parent6e5e41e2dc4e4413296d5a4af54ac92d7cd52317 (diff)
downloadlinux-badb55ec208adc4c406ed084f486deb1f9f5baa0.tar.bz2
gfs2: Split gfs2_lm_withdraw into two functions
Split gfs2_lm_withdraw into a function that prints an error message and a function that withdraws the filesystem. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/log.c')
-rw-r--r--fs/gfs2/log.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 00a2e721a374..c4c7c013f7a7 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -165,7 +165,7 @@ restart:
spin_unlock(&sdp->sd_ail_lock);
blk_finish_plug(&plug);
if (withdraw)
- gfs2_lm_withdraw(sdp, NULL);
+ gfs2_withdraw(sdp);
trace_gfs2_ail_flush(sdp, wbc, 0);
}
@@ -239,8 +239,10 @@ static int gfs2_ail1_empty(struct gfs2_sbd *sdp)
ret = list_empty(&sdp->sd_ail1_list);
spin_unlock(&sdp->sd_ail_lock);
- if (withdraw)
- gfs2_lm_withdraw(sdp, "fatal: I/O error(s)\n");
+ if (withdraw) {
+ gfs2_lm(sdp, "fatal: I/O error(s)\n");
+ gfs2_withdraw(sdp);
+ }
return ret;
}
@@ -1016,11 +1018,12 @@ int gfs2_logd(void *data)
/* Check for errors writing to the journal */
if (sdp->sd_log_error) {
- gfs2_lm_withdraw(sdp,
- "GFS2: fsid=%s: error %d: "
- "withdrawing the file system to "
- "prevent further damage.\n",
- sdp->sd_fsname, sdp->sd_log_error);
+ gfs2_lm(sdp,
+ "GFS2: fsid=%s: error %d: "
+ "withdrawing the file system to "
+ "prevent further damage.\n",
+ sdp->sd_fsname, sdp->sd_log_error);
+ gfs2_withdraw(sdp);
}
did_flush = false;