diff options
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index e3018e7a316c..41253393171f 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -1804,9 +1804,8 @@ static void encode_create_session(struct xdr_stream *xdr, | |||
1804 | struct compound_hdr *hdr) | 1804 | struct compound_hdr *hdr) |
1805 | { | 1805 | { |
1806 | __be32 *p; | 1806 | __be32 *p; |
1807 | char machine_name[NFS4_MAX_MACHINE_NAME_LEN]; | ||
1808 | uint32_t len; | ||
1809 | struct nfs_client *clp = args->client; | 1807 | struct nfs_client *clp = args->client; |
1808 | struct rpc_clnt *clnt = clp->cl_rpcclient; | ||
1810 | struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); | 1809 | struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); |
1811 | u32 max_resp_sz_cached; | 1810 | u32 max_resp_sz_cached; |
1812 | 1811 | ||
@@ -1817,11 +1816,8 @@ static void encode_create_session(struct xdr_stream *xdr, | |||
1817 | max_resp_sz_cached = (NFS4_dec_open_sz + RPC_REPHDRSIZE + | 1816 | max_resp_sz_cached = (NFS4_dec_open_sz + RPC_REPHDRSIZE + |
1818 | RPC_MAX_AUTH_SIZE + 2) * XDR_UNIT; | 1817 | RPC_MAX_AUTH_SIZE + 2) * XDR_UNIT; |
1819 | 1818 | ||
1820 | len = scnprintf(machine_name, sizeof(machine_name), "%s", | ||
1821 | clp->cl_ipaddr); | ||
1822 | |||
1823 | encode_op_hdr(xdr, OP_CREATE_SESSION, decode_create_session_maxsz, hdr); | 1819 | encode_op_hdr(xdr, OP_CREATE_SESSION, decode_create_session_maxsz, hdr); |
1824 | p = reserve_space(xdr, 16 + 2*28 + 20 + len + 12); | 1820 | p = reserve_space(xdr, 16 + 2*28 + 20 + clnt->cl_nodelen + 12); |
1825 | p = xdr_encode_hyper(p, clp->cl_clientid); | 1821 | p = xdr_encode_hyper(p, clp->cl_clientid); |
1826 | *p++ = cpu_to_be32(clp->cl_seqid); /*Sequence id */ | 1822 | *p++ = cpu_to_be32(clp->cl_seqid); /*Sequence id */ |
1827 | *p++ = cpu_to_be32(args->flags); /*flags */ | 1823 | *p++ = cpu_to_be32(args->flags); /*flags */ |
@@ -1850,7 +1846,7 @@ static void encode_create_session(struct xdr_stream *xdr, | |||
1850 | 1846 | ||
1851 | /* authsys_parms rfc1831 */ | 1847 | /* authsys_parms rfc1831 */ |
1852 | *p++ = cpu_to_be32(nn->boot_time.tv_nsec); /* stamp */ | 1848 | *p++ = cpu_to_be32(nn->boot_time.tv_nsec); /* stamp */ |
1853 | p = xdr_encode_opaque(p, machine_name, len); | 1849 | p = xdr_encode_array(p, clnt->cl_nodename, clnt->cl_nodelen); |
1854 | *p++ = cpu_to_be32(0); /* UID */ | 1850 | *p++ = cpu_to_be32(0); /* UID */ |
1855 | *p++ = cpu_to_be32(0); /* GID */ | 1851 | *p++ = cpu_to_be32(0); /* GID */ |
1856 | *p = cpu_to_be32(0); /* No more gids */ | 1852 | *p = cpu_to_be32(0); /* No more gids */ |