]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "nfs: ignore SB_RDONLY when remounting nfs"
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 28 Nov 2025 18:39:07 +0000 (13:39 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:34 +0000 (14:03 +0100)
[ Upstream commit 400fa37afbb11a601c204b72af0f0e5bc2db695c ]

This reverts commit 80c4de6ab44c14e910117a02f2f8241ffc6ec54a.

Silently ignoring the "ro" and "rw" mount options causes user confusion,
and regressions.

Reported-by: Alkis Georgopoulos<alkisg@gmail.com>
Cc: Li Lingfeng <lilingfeng3@huawei.com>
Fixes: 80c4de6ab44c ("nfs: ignore SB_RDONLY when remounting nfs")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/super.c

index 72dee6f3050e67820bb35dbf00074bcbcd27bd7a..527000f5d150cc2fb23a58ac825ba97c271f5c14 100644 (file)
@@ -1051,16 +1051,6 @@ int nfs_reconfigure(struct fs_context *fc)
 
        sync_filesystem(sb);
 
-       /*
-        * The SB_RDONLY flag has been removed from the superblock during
-        * mounts to prevent interference between different filesystems.
-        * Similarly, it is also necessary to ignore the SB_RDONLY flag
-        * during reconfiguration; otherwise, it may also result in the
-        * creation of redundant superblocks when mounting a directory with
-        * different rw and ro flags multiple times.
-        */
-       fc->sb_flags_mask &= ~SB_RDONLY;
-
        /*
         * Userspace mount programs that send binary options generally send
         * them populated with default values. We have no way to know which