summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 15:22:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 15:22:41 -0700
commit9e12a7e7d89ad813d01092890010cf67d0f914bd (patch)
tree0f7510f8f3364833024cb92267b2d39183fe803d /include
parenta7ddbf891b8236b51fb3c9574555eb7d7d13aca6 (diff)
parent2df54806389205d76bc3d1ce8a10cc14889ddec9 (diff)
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: NFS: Propagate 'fsc' mount option through automounts sunrpc/rpc_pipe: fix kernel-doc notation sunrpc: xdr_xcode_hyper helpers cannot presume 64-bit alignment NFS: Add nfs_alloc_parsed_mount_data NFS/RPC: fix problems with reestablish_timeout and related code. NFS: Get rid of the NFS_MOUNT_VER3 and NFS_MOUNT_TCP flags
Diffstat (limited to 'include')
-rw-r--r--include/linux/sunrpc/xdr.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index 7da466ba4b0..f5cc0898bc5 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -11,6 +11,7 @@
#include <linux/uio.h>
#include <asm/byteorder.h>
+#include <asm/unaligned.h>
#include <linux/scatterlist.h>
/*
@@ -117,14 +118,14 @@ static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int le
static inline __be32 *
xdr_encode_hyper(__be32 *p, __u64 val)
{
- *(__be64 *)p = cpu_to_be64(val);
+ put_unaligned_be64(val, p);
return p + 2;
}
static inline __be32 *
xdr_decode_hyper(__be32 *p, __u64 *valp)
{
- *valp = be64_to_cpup((__be64 *)p);
+ *valp = get_unaligned_be64(p);
return p + 2;
}