Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346616
b: refs/heads/master
c: d751f74
h: refs/heads/master
v: v3
  • Loading branch information
Jim Rees authored and Trond Myklebust committed Nov 22, 2012
1 parent 472f515 commit ee2b610
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe20d7d5eefb218b82033ba5c13cbcbd2a3d874c
refs/heads/master: d751f748b359534d78e2b2e52b59d39f0e0540aa
8 changes: 5 additions & 3 deletions trunk/fs/nfs/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ static int nfs4_stat_to_errno(int);

#if defined(CONFIG_NFS_V4_1)
#define NFS4_MAX_MACHINE_NAME_LEN (64)
#define IMPL_NAME_LIMIT (sizeof(utsname()->sysname) + sizeof(utsname()->release) + \
sizeof(utsname()->version) + sizeof(utsname()->machine) + 8)

#define encode_exchange_id_maxsz (op_encode_hdr_maxsz + \
encode_verifier_maxsz + \
Expand All @@ -282,7 +284,7 @@ static int nfs4_stat_to_errno(int);
1 /* nii_domain */ + \
XDR_QUADLEN(NFS4_OPAQUE_LIMIT) + \
1 /* nii_name */ + \
XDR_QUADLEN(NFS4_OPAQUE_LIMIT) + \
XDR_QUADLEN(IMPL_NAME_LIMIT) + \
3 /* nii_date */)
#define decode_exchange_id_maxsz (op_decode_hdr_maxsz + \
2 /* eir_clientid */ + \
Expand Down Expand Up @@ -1713,7 +1715,7 @@ static void encode_exchange_id(struct xdr_stream *xdr,
struct compound_hdr *hdr)
{
__be32 *p;
char impl_name[NFS4_OPAQUE_LIMIT];
char impl_name[IMPL_NAME_LIMIT];
int len = 0;

encode_op_hdr(xdr, OP_EXCHANGE_ID, decode_exchange_id_maxsz, hdr);
Expand All @@ -1728,7 +1730,7 @@ static void encode_exchange_id(struct xdr_stream *xdr,
if (send_implementation_id &&
sizeof(CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN) > 1 &&
sizeof(CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN)
<= NFS4_OPAQUE_LIMIT + 1)
<= sizeof(impl_name) + 1)
len = snprintf(impl_name, sizeof(impl_name), "%s %s %s %s",
utsname()->sysname, utsname()->release,
utsname()->version, utsname()->machine);
Expand Down

0 comments on commit ee2b610

Please sign in to comment.