|
@@ -4917,11 +4917,14 @@ static void nfs4_init_boot_verifier(const struct nfs_client *clp,
|
|
|
}
|
|
|
|
|
|
static unsigned int
|
|
|
-nfs4_init_nonuniform_client_string(const struct nfs_client *clp,
|
|
|
+nfs4_init_nonuniform_client_string(struct nfs_client *clp,
|
|
|
char *buf, size_t len)
|
|
|
{
|
|
|
unsigned int result;
|
|
|
|
|
|
+ if (clp->cl_owner_id != NULL)
|
|
|
+ return strlcpy(buf, clp->cl_owner_id, len);
|
|
|
+
|
|
|
rcu_read_lock();
|
|
|
result = scnprintf(buf, len, "Linux NFSv4.0 %s/%s %s",
|
|
|
clp->cl_ipaddr,
|
|
@@ -4930,24 +4933,32 @@ nfs4_init_nonuniform_client_string(const struct nfs_client *clp,
|
|
|
rpc_peeraddr2str(clp->cl_rpcclient,
|
|
|
RPC_DISPLAY_PROTO));
|
|
|
rcu_read_unlock();
|
|
|
+ clp->cl_owner_id = kstrdup(buf, GFP_KERNEL);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
static unsigned int
|
|
|
-nfs4_init_uniform_client_string(const struct nfs_client *clp,
|
|
|
+nfs4_init_uniform_client_string(struct nfs_client *clp,
|
|
|
char *buf, size_t len)
|
|
|
{
|
|
|
const char *nodename = clp->cl_rpcclient->cl_nodename;
|
|
|
+ unsigned int result;
|
|
|
+
|
|
|
+ if (clp->cl_owner_id != NULL)
|
|
|
+ return strlcpy(buf, clp->cl_owner_id, len);
|
|
|
|
|
|
if (nfs4_client_id_uniquifier[0] != '\0')
|
|
|
- return scnprintf(buf, len, "Linux NFSv%u.%u %s/%s",
|
|
|
+ result = scnprintf(buf, len, "Linux NFSv%u.%u %s/%s",
|
|
|
clp->rpc_ops->version,
|
|
|
clp->cl_minorversion,
|
|
|
nfs4_client_id_uniquifier,
|
|
|
nodename);
|
|
|
- return scnprintf(buf, len, "Linux NFSv%u.%u %s",
|
|
|
+ else
|
|
|
+ result = scnprintf(buf, len, "Linux NFSv%u.%u %s",
|
|
|
clp->rpc_ops->version, clp->cl_minorversion,
|
|
|
nodename);
|
|
|
+ clp->cl_owner_id = kstrdup(buf, GFP_KERNEL);
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
/*
|