On 5/8/2019 4:22 PM, Christoph Hellwig wrote:
@@ -325,20 +296,12 @@ iser_create_fastreg_desc(struct iser_device *device,
if (!desc)
return ERR_PTR(-ENOMEM);
- ret = iser_alloc_reg_res(device, pd, &desc->rsc, size);
+ ret = iser_alloc_reg_res(device, pd, &desc->rsc, size, pi_enable);
if (ret)
goto reg_res_alloc_failure;
- if (pi_enable) {
- ret = iser_alloc_pi_ctx(device, pd, desc, size);
- if (ret)
- goto pi_ctx_alloc_failure;
- }
-
Is there any reason to keep iser_create_fastreg_desc and
iser_alloc_reg_res separate after this?
Yes, we should merge these functions and also create
iser_destroy_fastreg_desc instead of iser_free_reg_res + kfree(desc).