hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/nfs/nfs3client.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/nfs_fs.h>
23 #include <linux/nfs_mount.h>
34 #include <linux/sunrpc/addr.h>
....@@ -45,10 +46,10 @@
4546 }
4647 #endif
4748
48
-struct nfs_server *nfs3_create_server(struct nfs_mount_info *mount_info,
49
- struct nfs_subversion *nfs_mod)
49
+struct nfs_server *nfs3_create_server(struct fs_context *fc)
5050 {
51
- struct nfs_server *server = nfs_create_server(mount_info, nfs_mod);
51
+ struct nfs_server *server = nfs_create_server(fc);
52
+
5253 /* Create a client RPC handle for the NFS v3 ACL management interface */
5354 if (!IS_ERR(server))
5455 nfs_init_server_aclclient(server);
....@@ -91,6 +92,7 @@
9192 .proto = ds_proto,
9293 .net = mds_clp->cl_net,
9394 .timeparms = &ds_timeout,
95
+ .cred = mds_srv->cred,
9496 };
9597 struct nfs_client *clp;
9698 char buf[INET6_ADDRSTRLEN + 1];
....@@ -100,8 +102,13 @@
100102 return ERR_PTR(-EINVAL);
101103 cl_init.hostname = buf;
102104
105
+ if (mds_clp->cl_nconnect > 1 && ds_proto == XPRT_TRANSPORT_TCP)
106
+ cl_init.nconnect = mds_clp->cl_nconnect;
107
+
103108 if (mds_srv->flags & NFS_MOUNT_NORESVPORT)
104
- set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);
109
+ __set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);
110
+
111
+ __set_bit(NFS_CS_DS, &cl_init.init_flags);
105112
106113 /* Use the MDS nfs_client cl_ipaddr. */
107114 nfs_init_timeout_values(&ds_timeout, ds_proto, ds_timeo, ds_retrans);