CERROR("Invalid option: too many fragments %u, %d max\n",
umd->length, LNET_MAX_IOV);
return -EINVAL;
- } else if (umd->length > LNET_MTU) {
- CERROR("Invalid length: too big fragment size %u, %d max\n",
- umd->length, LNET_MTU);
- return -EINVAL;
}
return 0;
if (rc != 0)
goto out_free;
+ if (md->md_length > LNET_MTU) {
+ CERROR("Invalid length: too big transfer size %u, %d max\n",
+ md->md_length, LNET_MTU);
+ rc = -EINVAL;
+ goto out_free;
+ }
+
cpt = lnet_res_lock_current();
rc = lnet_md_link(md, umd.eq_handle, cpt);