Commit 400fa37a authored by Trond Myklebust's avatar Trond Myklebust
Browse files

Revert "nfs: ignore SB_RDONLY when remounting nfs"



This reverts commit 80c4de6a.

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

Reported-by: default avatarAlkis <Georgopoulos&lt;alkisg@gmail.com>
Cc: Li Lingfeng <lilingfeng3@huawei.com>
Fixes: 80c4de6a ("nfs: ignore SB_RDONLY when remounting nfs")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent b6d2a520
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -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