提交 846d8e7c 编写于 作者: W Wei Yongjun 提交者: J. Bruce Fields

svcrdma: fix error handling of rdma_alloc_frmr()

ib_alloc_fast_reg_mr() and ib_alloc_fast_reg_page_list() returns
ERR_PTR() and not NULL. Compile tested only.
Signed-off-by: NWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
上级 28d0325c
...@@ -730,12 +730,12 @@ static struct svc_rdma_fastreg_mr *rdma_alloc_frmr(struct svcxprt_rdma *xprt) ...@@ -730,12 +730,12 @@ static struct svc_rdma_fastreg_mr *rdma_alloc_frmr(struct svcxprt_rdma *xprt)
goto err; goto err;
mr = ib_alloc_fast_reg_mr(xprt->sc_pd, RPCSVC_MAXPAGES); mr = ib_alloc_fast_reg_mr(xprt->sc_pd, RPCSVC_MAXPAGES);
if (!mr) if (IS_ERR(mr))
goto err_free_frmr; goto err_free_frmr;
pl = ib_alloc_fast_reg_page_list(xprt->sc_cm_id->device, pl = ib_alloc_fast_reg_page_list(xprt->sc_cm_id->device,
RPCSVC_MAXPAGES); RPCSVC_MAXPAGES);
if (!pl) if (IS_ERR(pl))
goto err_free_mr; goto err_free_mr;
frmr->mr = mr; frmr->mr = mr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册