.. | .. |
---|
866 | 866 | return req; |
---|
867 | 867 | |
---|
868 | 868 | out3: |
---|
869 | | - kfree(req->rl_sendbuf); |
---|
| 869 | + rpcrdma_regbuf_free(req->rl_sendbuf); |
---|
870 | 870 | out2: |
---|
871 | 871 | kfree(req); |
---|
872 | 872 | out1: |
---|
.. | .. |
---|
972 | 972 | if (!rep->rr_rdmabuf) |
---|
973 | 973 | goto out_free; |
---|
974 | 974 | |
---|
975 | | - if (!rpcrdma_regbuf_dma_map(r_xprt, rep->rr_rdmabuf)) |
---|
976 | | - goto out_free_regbuf; |
---|
977 | | - |
---|
978 | 975 | xdr_buf_init(&rep->rr_hdrbuf, rdmab_data(rep->rr_rdmabuf), |
---|
979 | 976 | rdmab_length(rep->rr_rdmabuf)); |
---|
980 | 977 | rep->rr_cqe.done = rpcrdma_wc_receive; |
---|
.. | .. |
---|
987 | 984 | list_add(&rep->rr_all, &r_xprt->rx_buf.rb_all_reps); |
---|
988 | 985 | return rep; |
---|
989 | 986 | |
---|
990 | | -out_free_regbuf: |
---|
991 | | - rpcrdma_regbuf_free(rep->rr_rdmabuf); |
---|
992 | 987 | out_free: |
---|
993 | 988 | kfree(rep); |
---|
994 | 989 | out: |
---|
.. | .. |
---|
1425 | 1420 | rep = rpcrdma_rep_create(r_xprt, temp); |
---|
1426 | 1421 | if (!rep) |
---|
1427 | 1422 | break; |
---|
| 1423 | + if (!rpcrdma_regbuf_dma_map(r_xprt, rep->rr_rdmabuf)) { |
---|
| 1424 | + rpcrdma_rep_put(buf, rep); |
---|
| 1425 | + break; |
---|
| 1426 | + } |
---|
1428 | 1427 | |
---|
1429 | 1428 | trace_xprtrdma_post_recv(rep); |
---|
1430 | 1429 | rep->rr_recv_wr.next = wr; |
---|