diff --git a/lustre/include/obd.h b/lustre/include/obd.h index c999e0fe62276cf66bfed9a3228ed002c70e92c8..297d8dbfe652d4d179f64e7b14e6af3497386e48 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -657,17 +657,18 @@ static inline void oti_init(struct obd_trans_info *oti, { if (oti == NULL) return; - memset(oti, 0, sizeof *oti); + memset(oti, 0, sizeof(*oti)); if (req == NULL) return; oti->oti_xid = req->rq_xid; - if ((req->rq_reqmsg != NULL) && (req->rq_repmsg != NULL)) + if (req->rq_repmsg != NULL) oti->oti_transno = lustre_msg_get_transno(req->rq_repmsg); oti->oti_thread_id = req->rq_svc_thread ? req->rq_svc_thread->t_id : -1; - oti->oti_conn_cnt = lustre_msg_get_conn_cnt(req->rq_reqmsg); + if (req->rq_reqmsg != NULL) + oti->oti_conn_cnt = lustre_msg_get_conn_cnt(req->rq_reqmsg); } static inline void oti_alloc_cookies(struct obd_trans_info *oti,int num_cookies)