projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b39326
)
ceph: osd_client: fix endianness bug in osd_req_encode_op()
author
Alex Elder
<elder@dreawmhost.com>
Fri, 20 Apr 2012 20:49:43 +0000
(15:49 -0500)
committer
Alex Elder
<elder@dreamhost.com>
Mon, 14 May 2012 17:12:22 +0000
(12:12 -0500)
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>
net/ceph/osd_client.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ceph/osd_client.c
b/net/ceph/osd_client.c
index 5e254055c91086287cd0d96091cb2eac50fecc38..daa2716a0c3027f2d5d1fe58b7349c4d1361bfe5 100644
(file)
--- a/
net/ceph/osd_client.c
+++ b/
net/ceph/osd_client.c
@@
-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 =