aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs3client.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/nfs3client.c b/fs/nfs/nfs3client.c
index 52e2344bf9a1..9e9fa347a948 100644
--- a/fs/nfs/nfs3client.c
+++ b/fs/nfs/nfs3client.c
@@ -1,5 +1,6 @@
1#include <linux/nfs_fs.h> 1#include <linux/nfs_fs.h>
2#include <linux/nfs_mount.h> 2#include <linux/nfs_mount.h>
3#include <linux/sunrpc/addr.h>
3#include "internal.h" 4#include "internal.h"
4#include "nfs3_fs.h" 5#include "nfs3_fs.h"
5 6
@@ -89,6 +90,12 @@ struct nfs_client *nfs3_set_ds_client(struct nfs_client *mds_clp,
89 }; 90 };
90 struct rpc_timeout ds_timeout; 91 struct rpc_timeout ds_timeout;
91 struct nfs_client *clp; 92 struct nfs_client *clp;
93 char buf[INET6_ADDRSTRLEN + 1];
94
95 /* fake a hostname because lockd wants it */
96 if (rpc_ntop(ds_addr, buf, sizeof(buf)) <= 0)
97 return ERR_PTR(-EINVAL);
98 cl_init.hostname = buf;
92 99
93 /* Use the MDS nfs_client cl_ipaddr. */ 100 /* Use the MDS nfs_client cl_ipaddr. */
94 nfs_init_timeout_values(&ds_timeout, ds_proto, ds_timeo, ds_retrans); 101 nfs_init_timeout_values(&ds_timeout, ds_proto, ds_timeo, ds_retrans);