diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-06-06 09:15:33 -0500 |
---|---|---|
committer | Alex Elder <elder@dreamhost.com> | 2012-06-06 09:23:54 -0500 |
commit | 895cfcc810e53d7d36639969c71efb9087221167 (patch) | |
tree | 4e97c3aaa7d77e12e187b8fb2eda3c115d9418fe /drivers/block | |
parent | f9f9a1904467816452fc70740165030e84c2c659 (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>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 2 |
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) op = (void *)(replyhead + 1); rc = le32_to_cpu(replyhead->result); bytes = le64_to_cpu(op->extent.length); - read_op = (le32_to_cpu(op->op) == CEPH_OSD_OP_READ); + read_op = (le16_to_cpu(op->op) == CEPH_OSD_OP_READ); dout("rbd_req_cb bytes=%lld readop=%d rc=%d\n", bytes, read_op, rc); |