Skip to content

Commit 41a264e

Browse files
committed
libceph: no need to call osd_req_opcode_valid() in osd_req_encode_op()
Any uninitialized or unknown ops will be caught by the default clause anyway. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1 parent 6680288 commit 41a264e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

net/ceph/osd_client.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -903,12 +903,6 @@ static void ceph_osdc_msg_data_add(struct ceph_msg *msg,
903903
static u32 osd_req_encode_op(struct ceph_osd_op *dst,
904904
const struct ceph_osd_req_op *src)
905905
{
906-
if (WARN_ON(!osd_req_opcode_valid(src->op))) {
907-
pr_err("unrecognized osd opcode %d\n", src->op);
908-
909-
return 0;
910-
}
911-
912906
switch (src->op) {
913907
case CEPH_OSD_OP_STAT:
914908
break;

0 commit comments

Comments
 (0)