aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-06-06 10:15:33 -0400
committerSage Weil <sage@inktank.com>2012-07-18 00:30:31 -0400
commit6a3ca4f18873f950895cb64ddefafb51a732e3f7 (patch)
tree2d2431b333e6ffd98037c8f1b6058ad5d5f17c3c
parent236df3755d944c33120d77e84b5ff6f3917eb307 (diff)
rbd: endian bug in rbd_req_cb()
Sparse complains about this because: drivers/block/rbd.c:996:20: warning: cast to restricted __le32 drivers/block/rbd.c:996:20: warning: cast from restricted __le16 These are set in osd_req_encode_op() and they are le16. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Alex Elder <elder@inktank.com> (cherry picked from commit 895cfcc810e53d7d36639969c71efb9087221167)
-rw-r--r--drivers/block/rbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 8b9c1734d807..8f428a8ab003 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -977,7 +977,7 @@ static void rbd_req_cb(struct ceph_osd_request *req, struct ceph_msg *msg)
977 op = (void *)(replyhead + 1); 977 op = (void *)(replyhead + 1);
978 rc = le32_to_cpu(replyhead->result); 978 rc = le32_to_cpu(replyhead->result);
979 bytes = le64_to_cpu(op->extent.length); 979 bytes = le64_to_cpu(op->extent.length);
980 read_op = (le32_to_cpu(op->op) == CEPH_OSD_OP_READ); 980 read_op = (le16_to_cpu(op->op) == CEPH_OSD_OP_READ);
981 981
982 dout("rbd_req_cb bytes=%lld readop=%d rc=%d\n", bytes, read_op, rc); 982 dout("rbd_req_cb bytes=%lld readop=%d rc=%d\n", bytes, read_op, rc);
983 983