diff options
| author | 2009-08-19 18:21:52 -0400 | |
|---|---|---|
| committer | 2009-08-19 18:21:52 -0400 | |
| commit | 6a396f67d2442e30150ffb5e1142dbb2f2181d3f (patch) | |
| tree | 2ea4f3ab1d3766204a55ec26600b848ed3a7e8aa /include/linux/sunrpc | |
| parent | Merge branch 'sunrpc_cache-for-2.6.32' into nfs-for-2.6.32 (diff) | |
| parent | nfs: nfs4xdr: optimize low level decoding (diff) | |
| download | linux-dev-6a396f67d2442e30150ffb5e1142dbb2f2181d3f.tar.xz linux-dev-6a396f67d2442e30150ffb5e1142dbb2f2181d3f.zip | |
Merge branch 'nfsv4_xdr_cleanups-for-2.6.32' into nfs-for-2.6.32
Conflicts:
fs/nfs/nfs4xdr.c
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/xdr.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index b99c625fddfe..7da466ba4b0d 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h @@ -117,17 +117,15 @@ static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int le static inline __be32 * xdr_encode_hyper(__be32 *p, __u64 val) { - *p++ = htonl(val >> 32); - *p++ = htonl(val & 0xFFFFFFFF); - return p; + *(__be64 *)p = cpu_to_be64(val); + return p + 2; } static inline __be32 * xdr_decode_hyper(__be32 *p, __u64 *valp) { - *valp = ((__u64) ntohl(*p++)) << 32; - *valp |= ntohl(*p++); - return p; + *valp = be64_to_cpup((__be64 *)p); + return p + 2; } /* |
