[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F8EDB37.5000900@dreamhost.com>
Date:	Wed, 18 Apr 2012 10:18:15 -0500
From:	Alex Elder <elder@...amhost.com>
To:	ceph-devel@...r.kernel.org
CC:	Al Viro <viro@...IV.linux.org.uk>, Sage Weil <sage@...dream.net>,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [PATCH] ceph: osd_client: fix endianness bug in osd_req_encode_op()
 From Al Viro <viro@...iv.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@...amhost.com>
---
  net/ceph/osd_client.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Index: b/net/ceph/osd_client.c
===================================================================
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -278,7 +278,7 @@ static void osd_req_encode_op(struct cep
  {
  	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 =
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
