From: Trond Myklebust Date: Fri, 28 Nov 2025 18:39:38 +0000 (-0500) Subject: Revert "nfs: clear SB_RDONLY before getting superblock" X-Git-Tag: v6.19-rc1~27^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d216b698d44e33417ad4cc796cb04ccddbb8c0ee;p=thirdparty%2Fkernel%2Flinux.git Revert "nfs: clear SB_RDONLY before getting superblock" This reverts commit 8cd9b785943c57a136536250da80ba1eb6f8eb18. Silently ignoring the "ro" and "rw" mount options causes user confusion, and regressions. Reported-by: Alkis Georgopoulos Cc: Li Lingfeng Fixes: 8cd9b785943c ("nfs: clear SB_RDONLY before getting superblock") Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 527000f5d150..9b9464e70a7f 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -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)