gfs2: Reconfiguring frozen filesystem already rejected
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 17 Nov 2022 10:53:07 +0000 (11:53 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 15 Jun 2023 07:57:38 +0000 (09:57 +0200)
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>
fs/gfs2/ops_fstype.c

index 4fb25496e92f9f87af48f18b125d6ff30f5a4fdd..12eedba45dbbb6387eb8a16372509c761a2c2e37 100644 (file)
@@ -1590,12 +1590,6 @@ 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 {
@@ -1603,7 +1597,6 @@ static int gfs2_reconfigure(struct fs_context *fc)
                        if (error)
                                errorfc(fc, "unable to remount read-write");
                }
-               gfs2_freeze_unlock(&freeze_gh);
        }
        sdp->sd_args = *newargs;