
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBNEQX -------------------------------- This reverts commit a94b6e8ae792a9fd1cf555ffe46d39a4961cdfd9. Since flags passed by users can not be set to fc->sb_flags, check of fc->sb_flags in nfs_compare_mount_options is useless. The second mount may get the superblock of the first mount since nfs_compare_mount_options will return true, resulting the change of s_flags. Revert this patch and fix the origin issue later. Fixes: a94b6e8ae792 ("nfs: fix the loss of superblock's initialized flags") Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com> --- fs/nfs/nfs4super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index e87f878178f3..bb13894ad152 100644 --- a/fs/nfs/nfs4super.c +++ b/fs/nfs/nfs4super.c @@ -209,7 +209,7 @@ static int do_nfs4_mount(struct nfs_server *server, if (IS_ERR(dentry)) return PTR_ERR(dentry); - dentry->d_sb->s_flags |= (fc->sb_flags & SB_RDONLY); + dentry->d_sb->s_flags = fc->sb_flags; fc->root = dentry; return 0; } -- 2.31.1