提交 41a264e1 编写于 作者: I Ilya Dryomov

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: NIlya Dryomov <idryomov@gmail.com>
上级 66802884
...@@ -903,12 +903,6 @@ static void ceph_osdc_msg_data_add(struct ceph_msg *msg, ...@@ -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, static u32 osd_req_encode_op(struct ceph_osd_op *dst,
const struct ceph_osd_req_op *src) 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) { switch (src->op) {
case CEPH_OSD_OP_STAT: case CEPH_OSD_OP_STAT:
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册