Skip to content

Commit 065a68f

Browse files
Alex ElderAlex Elder
authored andcommitted
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>
1 parent 8b39326 commit 065a68f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/ceph/osd_client.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ static void osd_req_encode_op(struct ceph_osd_request *req,
278278
{
279279
dst->op = cpu_to_le16(src->op);
280280

281-
switch (dst->op) {
281+
switch (src->op) {
282282
case CEPH_OSD_OP_READ:
283283
case CEPH_OSD_OP_WRITE:
284284
dst->extent.offset =

0 commit comments

Comments
 (0)