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 | |
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>
-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 3bffba63e6a0..67b44963e8ad 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -2620,17 +2620,14 @@ out_put: | |||
2620 | static __be32 * | 2620 | static __be32 * |
2621 | nfsd4_encode_rdattr_error(__be32 *p, int buflen, __be32 nfserr) | 2621 | nfsd4_encode_rdattr_error(__be32 *p, int buflen, __be32 nfserr) |
2622 | { | 2622 | { |
2623 | __be32 *attrlenp; | ||
2624 | |||
2625 | if (buflen < 6) | 2623 | if (buflen < 6) |
2626 | return NULL; | 2624 | return NULL; |
2627 | *p++ = htonl(2); | 2625 | *p++ = htonl(2); |
2628 | *p++ = htonl(FATTR4_WORD0_RDATTR_ERROR); /* bmval0 */ | 2626 | *p++ = htonl(FATTR4_WORD0_RDATTR_ERROR); /* bmval0 */ |
2629 | *p++ = htonl(0); /* bmval1 */ | 2627 | *p++ = htonl(0); /* bmval1 */ |
2630 | 2628 | ||
2631 | attrlenp = p++; | 2629 | *p++ = htonl(4); /* attribute length */ |
2632 | *p++ = nfserr; /* no htonl */ | 2630 | *p++ = nfserr; /* no htonl */ |
2633 | *attrlenp = htonl((char *)p - (char *)attrlenp - 4); | ||
2634 | return p; | 2631 | return p; |
2635 | } | 2632 | } |
2636 | 2633 | ||