Skip to content

Commit

Permalink
libceph: no need to call osd_req_opcode_valid() in osd_req_encode_op()
Browse files Browse the repository at this point in the history
Any uninitialized or unknown ops will be caught by the default clause
anyway.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
Ilya Dryomov committed Oct 22, 2018
1 parent 6680288 commit 41a264e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,12 +903,6 @@ static void ceph_osdc_msg_data_add(struct ceph_msg *msg,
static u32 osd_req_encode_op(struct ceph_osd_op *dst,
const struct ceph_osd_req_op *src)
{
if (WARN_ON(!osd_req_opcode_valid(src->op))) {
pr_err("unrecognized osd opcode %d\n", src->op);

return 0;
}

switch (src->op) {
case CEPH_OSD_OP_STAT:
break;
Expand Down

0 comments on commit 41a264e

Please sign in to comment.