Skip to content

Commit

Permalink
ceph: osd_client: fix endianness bug in osd_req_encode_op()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Elder authored and Alex Elder committed May 14, 2012
1 parent 8b39326 commit 065a68f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ static void osd_req_encode_op(struct ceph_osd_request *req,
{
dst->op = cpu_to_le16(src->op);

switch (dst->op) {
switch (src->op) {
case CEPH_OSD_OP_READ:
case CEPH_OSD_OP_WRITE:
dst->extent.offset =
Expand Down

0 comments on commit 065a68f

Please sign in to comment.