- /* NB: message will not generate event because w/o attached MD,
- * so we just use 0 as the third parameter */
- lnet_finalize(msg->msg_rxpeer->lp_ni, msg, 0);
+ /*
+ * NB: message will not generate event because w/o attached MD,
+ * but we still should give error code so lnet_msg_decommit()
+ * can skip counters operations and other checks.
+ */
+ lnet_finalize(msg->msg_rxpeer->lp_ni, msg, -ENOENT);