diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-01-16 17:33:28 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-01-07 16:01:18 -0500 |
commit | 87915c6472acbc5d7c809f3c9753808797da51a8 (patch) | |
tree | 45d1f8c24c42403b880e4849d963dbf5866edc70 /fs/nfsd | |
parent | 6b6d8137f1d3fc7a3970e1e384b8ce2d0967e087 (diff) |
nfsd4: encode_rdattr_error cleanup
There's a simpler way to write this.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 3bffba63e6a..67b44963e8a 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2620,17 +2620,14 @@ out_put: static __be32 * nfsd4_encode_rdattr_error(__be32 *p, int buflen, __be32 nfserr) { - __be32 *attrlenp; - if (buflen < 6) return NULL; *p++ = htonl(2); *p++ = htonl(FATTR4_WORD0_RDATTR_ERROR); /* bmval0 */ *p++ = htonl(0); /* bmval1 */ - attrlenp = p++; + *p++ = htonl(4); /* attribute length */ *p++ = nfserr; /* no htonl */ - *attrlenp = htonl((char *)p - (char *)attrlenp - 4); return p; } |