提交 97363c6a 编写于 作者: B Benny Halevy 提交者: Trond Myklebust

sunrpc: xdr_xcode_hyper helpers cannot presume 64-bit alignment

Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 9423a08a
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册