diff options
author | Alex Elder <elder@dreawmhost.com> | 2012-04-20 16:49:43 -0400 |
---|---|---|
committer | Alex Elder <elder@dreamhost.com> | 2012-05-14 13:12:22 -0400 |
commit | 065a68f9167e20f321a62d044cb2c3024393d455 (patch) | |
tree | 04bf0db8822f6675c732b2b0e3fa54e2f1c8f755 /net/ceph | |
parent | 8b393269008411a612ca549b733b4296e819f2fb (diff) |
ceph: osd_client: fix endianness bug in osd_req_encode_op()
From Al Viro <viro@zeniv.linux.org.uk>
Al Viro noticed that we were using a non-cpu-encoded value in
a switch statement in osd_req_encode_op(). The result would
clearly not work correctly on a big-endian machine.
Signed-off-by: Alex Elder <elder@dreamhost.com>
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/osd_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 5e254055c910..daa2716a0c30 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -278,7 +278,7 @@ static void osd_req_encode_op(struct ceph_osd_request *req, | |||
278 | { | 278 | { |
279 | dst->op = cpu_to_le16(src->op); | 279 | dst->op = cpu_to_le16(src->op); |
280 | 280 | ||
281 | switch (dst->op) { | 281 | switch (src->op) { |
282 | case CEPH_OSD_OP_READ: | 282 | case CEPH_OSD_OP_READ: |
283 | case CEPH_OSD_OP_WRITE: | 283 | case CEPH_OSD_OP_WRITE: |
284 | dst->extent.offset = | 284 | dst->extent.offset = |