Commit 55317f5b authored by Bob Peterson's avatar Bob Peterson Committed by Andreas Gruenbacher

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: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 04aea0ca
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment