diff options
-rw-r--r-- | fs/nfs/super.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 9eea9e62afc9..1a609471e85e 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1308,8 +1308,17 @@ 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) |