aboutsummaryrefslogtreecommitdiff
path: root/fs/gfs2
diff options
context:
space:
mode:
authorBob Peterson2019-04-29 09:36:23 -0600
committerAndreas Gruenbacher2019-06-27 21:26:58 +0200
commit55317f5b00f0dc0c807979292362ddc568b5bcc9 (patch)
tree2f52e3fae5bef3de74fcc6ea9616745b093e02aa /fs/gfs2
parent04aea0ca14f025828c22d8ef586ff59d0be2f98b (diff)
gfs2: simplify gfs2_freeze by removing case
Function gfs2_freeze had a case statement that simply checked the error code, but the break statements just made the logic hard to read. This patch simplifies the logic in favor of a simple if. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/super.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 129ae4376af4..3eae973d525f 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -1023,20 +1023,14 @@ static int gfs2_freeze(struct super_block *sb)
if (!error)
break;
- switch (error) {
- case -EBUSY:
+ if (error == -EBUSY)
fs_err(sdp, "waiting for recovery before freeze\n");
- break;
-
- default:
+ else
fs_err(sdp, "error freezing FS: %d\n", error);
- break;
- }
fs_err(sdp, "retrying...\n");
msleep(1000);
}
- error = 0;
set_bit(SDF_FS_FROZEN, &sdp->sd_flags);
out:
mutex_unlock(&sdp->sd_freeze_mutex);