mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 11:13:58 +08:00
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>
This commit is contained in:
parent
04aea0ca14
commit
55317f5b00
@ -1023,20 +1023,14 @@ static int gfs2_freeze(struct super_block *sb)
|
|||||||
if (!error)
|
if (!error)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
switch (error) {
|
if (error == -EBUSY)
|
||||||
case -EBUSY:
|
|
||||||
fs_err(sdp, "waiting for recovery before freeze\n");
|
fs_err(sdp, "waiting for recovery before freeze\n");
|
||||||
break;
|
else
|
||||||
|
|
||||||
default:
|
|
||||||
fs_err(sdp, "error freezing FS: %d\n", error);
|
fs_err(sdp, "error freezing FS: %d\n", error);
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
fs_err(sdp, "retrying...\n");
|
fs_err(sdp, "retrying...\n");
|
||||||
msleep(1000);
|
msleep(1000);
|
||||||
}
|
}
|
||||||
error = 0;
|
|
||||||
set_bit(SDF_FS_FROZEN, &sdp->sd_flags);
|
set_bit(SDF_FS_FROZEN, &sdp->sd_flags);
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&sdp->sd_freeze_mutex);
|
mutex_unlock(&sdp->sd_freeze_mutex);
|
||||||
|
Loading…
Reference in New Issue
Block a user