Skip to content

Commit

Permalink
gfs2: Reconfiguring frozen filesystem already rejected
Browse files Browse the repository at this point in the history
Reconfiguring a frozen filesystem is already rejected in
reconfigure_super(), so there is no need to check for that condition
again at the filesystem level.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
  • Loading branch information
Andreas Gruenbacher committed Jun 15, 2023
1 parent e392edd commit 9e4f095
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions fs/gfs2/ops_fstype.c
Original file line number Diff line number Diff line change
Expand Up @@ -1590,20 +1590,13 @@ static int gfs2_reconfigure(struct fs_context *fc)
fc->sb_flags |= SB_RDONLY;

if ((sb->s_flags ^ fc->sb_flags) & SB_RDONLY) {
struct gfs2_holder freeze_gh;

error = gfs2_freeze_lock_shared(sdp, &freeze_gh, 0);
if (error)
return -EINVAL;

if (fc->sb_flags & SB_RDONLY) {
gfs2_make_fs_ro(sdp);
} else {
error = gfs2_make_fs_rw(sdp);
if (error)
errorfc(fc, "unable to remount read-write");
}
gfs2_freeze_unlock(&freeze_gh);
}
sdp->sd_args = *newargs;

Expand Down

0 comments on commit 9e4f095

Please sign in to comment.