Commit d216b698 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

Revert "nfs: clear SB_RDONLY before getting superblock"



This reverts commit 8cd9b785.

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: 8cd9b785 ("nfs: clear SB_RDONLY before getting superblock")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 400fa37a
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -1308,17 +1308,8 @@ int nfs_get_tree_common(struct fs_context *fc)
	if (IS_ERR(server))
		return PTR_ERR(server);

	/*
	 * When NFS_MOUNT_UNSHARED is not set, NFS forces the sharing of a
	 * superblock among each filesystem that mounts sub-directories
	 * belonging to a single exported root path.
	 * To prevent interference between different filesystems, the
	 * SB_RDONLY flag should be removed from the superblock.
	 */
	if (server->flags & NFS_MOUNT_UNSHARED)
		compare_super = NULL;
	else
		fc->sb_flags &= ~SB_RDONLY;

	/* -o noac implies -o sync */
	if (server->flags & NFS_MOUNT_NOAC)