diff options
author | Alex Elder <elder@inktank.com> | 2013-03-04 11:08:29 -0600 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-01 21:16:13 -0700 |
commit | 8f63ca2d23c7922b24d7b95e54740ec29c859379 (patch) | |
tree | 4ff0bf8a8a5bf6fa4777e5778f1fe02e1243e820 | |
parent | 0d5af1643535508f82d6bcc2b9b93b180e8c3f4b (diff) |
libceph: fix wrong opcode use in osd_req_encode_op()
The new cases added to osd_req_encode_op() caused a new sparse
error, which highlighted an existing problem that had been
overlooked since it was originally checked in. When an unsupported
opcode is found the destination rather than the source opcode was
being used in the error message. The two differ in their byte
order, and we want to be using the one in the source.
Fix the problem in both spots.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
-rw-r--r-- | net/ceph/osd_client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index a28c976ae3ae..d7ce457c59d9 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -249,7 +249,7 @@ static void osd_req_encode_op(struct ceph_osd_request *req, dst->watch.flag = src->watch.flag; break; default: - pr_err("unrecognized osd opcode %d\n", dst->op); + pr_err("unrecognized osd opcode %d\n", src->op); WARN_ON(1); break; case CEPH_OSD_OP_MAPEXT: @@ -307,7 +307,7 @@ static void osd_req_encode_op(struct ceph_osd_request *req, case CEPH_OSD_OP_PGLS: case CEPH_OSD_OP_PGLS_FILTER: pr_err("unsupported osd opcode %s\n", - ceph_osd_op_name(dst->op)); + ceph_osd_op_name(src->op)); WARN_ON(1); break; } |