summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2015-08-31 04:53:33 +0200
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-09-02 00:19:40 +0200
commit4a70316caef7d158445e672e146eb9f1b8c1aeee (patch)
treede26fffc656a0874cc0a04724aa76e357377157e /fs/nfs
parentNFSv4.1/flexfiles: Mark layout for return if the mirrors are invalid (diff)
downloadlinux-4a70316caef7d158445e672e146eb9f1b8c1aeee.tar.xz
linux-4a70316caef7d158445e672e146eb9f1b8c1aeee.zip
nfs: Fix truncated client owner id without proto type
The length of "Linux NFSv4.0 " is 14, not 10. Without this patch, I get a truncated client owner id as, "Linux NFSv4.0 ::1/::1" With this patch, "Linux NFSv4.0 ::1/::1 tcp" Fixes: a319268891 ("nfs: make nfs4_init_nonuniform_client_string use a dynamically allocated buffer") Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 51c7164abd1a..3f73539579e5 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5020,7 +5020,7 @@ nfs4_init_nonuniform_client_string(struct nfs_client *clp)
return 0;
retry:
rcu_read_lock();
- len = 10 + strlen(clp->cl_ipaddr) + 1 +
+ len = 14 + strlen(clp->cl_ipaddr) + 1 +
strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR)) +
1 +
strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_PROTO)) +