Merge tag 'kbuild-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
[linux-2.6-microblaze.git] / fs / nfs / super.c
index 94885c6..19a212f 100644 (file)
@@ -116,16 +116,12 @@ static void unregister_nfs4_fs(void)
 #ifdef CONFIG_NFS_V4_2
 static void nfs_ssc_register_ops(void)
 {
-#ifdef CONFIG_NFSD_V4
        nfs_ssc_register(&nfs_ssc_clnt_ops_tbl);
-#endif
 }
 
 static void nfs_ssc_unregister_ops(void)
 {
-#ifdef CONFIG_NFSD_V4
        nfs_ssc_unregister(&nfs_ssc_clnt_ops_tbl);
-#endif
 }
 #endif /* CONFIG_NFS_V4_2 */
 
@@ -867,7 +863,7 @@ static int nfs_request_mount(struct fs_context *fc,
         * Now ask the mount server to map our export path
         * to a file handle.
         */
-       status = nfs_mount(&request);
+       status = nfs_mount(&request, ctx->timeo, ctx->retrans);
        if (status != 0) {
                dfprintk(MOUNT, "NFS: unable to mount server %s, error %d\n",
                                request.hostname, status);
@@ -1045,7 +1041,7 @@ static void nfs_fill_super(struct super_block *sb, struct nfs_fs_context *ctx)
        sb->s_blocksize = 0;
        sb->s_xattr = server->nfs_client->cl_nfs_mod->xattr;
        sb->s_op = server->nfs_client->cl_nfs_mod->sops;
-       if (ctx && ctx->bsize)
+       if (ctx->bsize)
                sb->s_blocksize = nfs_block_size(ctx->bsize, &sb->s_blocksize_bits);
 
        if (server->nfs_client->rpc_ops->version != 2) {
@@ -1077,6 +1073,7 @@ static void nfs_fill_super(struct super_block *sb, struct nfs_fs_context *ctx)
                                                 &sb->s_blocksize_bits);
 
        nfs_super_set_maxbytes(sb, server->maxfilesize);
+       server->has_sec_mnt_opts = ctx->has_sec_mnt_opts;
 }
 
 static int nfs_compare_mount_options(const struct super_block *s, const struct nfs_server *b,
@@ -1193,6 +1190,9 @@ static int nfs_compare_super(struct super_block *sb, struct fs_context *fc)
                return 0;
        if (!nfs_compare_userns(old, server))
                return 0;
+       if ((old->has_sec_mnt_opts || fc->security) &&
+                       security_sb_mnt_opts_compat(sb, fc->security))
+               return 0;
        return nfs_compare_mount_options(sb, server, fc);
 }