@@ -1738,7 +1738,7 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
struct bio_vec *kiov = lntmsg->msg_kiov;
unsigned int offset = lntmsg->msg_offset;
unsigned int nob = lntmsg->msg_len;
- struct lnet_libmd *payload_md = lntmsg->msg_md;
+ struct lnet_libmd *msg_md = lntmsg->msg_md;
struct kib_tx *tx;
int rc;
@@ -1749,7 +1749,7 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
goto failed_0;
}
- tx->tx_gpu = !!(payload_md->md_flags & LNET_MD_FLAG_GPU);
+ tx->tx_gpu = msg_md ? (msg_md->md_flags & LNET_MD_FLAG_GPU) : 0;
if (!nob)
rc = 0;
else
@@ -1847,7 +1847,7 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
case IBLND_MSG_PUT_REQ: {
struct kib_msg *txmsg;
struct kib_rdma_desc *rd;
- struct lnet_libmd *payload_md = lntmsg->msg_md;
+ struct lnet_libmd *msg_md = lntmsg->msg_md;
ibprm_cookie = rxmsg->ibm_u.putreq.ibprm_cookie;
@@ -1867,7 +1867,8 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
break;
}
- tx->tx_gpu = !!(payload_md->md_flags & LNET_MD_FLAG_GPU);
+ tx->tx_gpu = msg_md ? (msg_md->md_flags & LNET_MD_FLAG_GPU) : 0;
+
txmsg = tx->tx_msg;
rd = &txmsg->ibm_u.putack.ibpam_rd;
rc = kiblnd_setup_rd_kiov(ni, tx, rd,