File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 52
52
53
53
/**
54
54
* frwr_release_mr - Destroy one MR
55
- * @mr: MR allocated by frwr_init_mr
55
+ * @mr: MR allocated by frwr_mr_init
56
56
*
57
57
*/
58
58
void frwr_release_mr (struct rpcrdma_mr * mr )
@@ -106,15 +106,16 @@ void frwr_reset(struct rpcrdma_req *req)
106
106
}
107
107
108
108
/**
109
- * frwr_init_mr - Initialize one MR
110
- * @ia: interface adapter
109
+ * frwr_mr_init - Initialize one MR
110
+ * @r_xprt: controlling transport instance
111
111
* @mr: generic MR to prepare for FRWR
112
112
*
113
113
* Returns zero if successful. Otherwise a negative errno
114
114
* is returned.
115
115
*/
116
- int frwr_init_mr (struct rpcrdma_ia * ia , struct rpcrdma_mr * mr )
116
+ int frwr_mr_init (struct rpcrdma_xprt * r_xprt , struct rpcrdma_mr * mr )
117
117
{
118
+ struct rpcrdma_ia * ia = & r_xprt -> rx_ia ;
118
119
unsigned int depth = ia -> ri_max_frwr_depth ;
119
120
struct scatterlist * sg ;
120
121
struct ib_mr * frmr ;
@@ -128,6 +129,7 @@ int frwr_init_mr(struct rpcrdma_ia *ia, struct rpcrdma_mr *mr)
128
129
if (!sg )
129
130
goto out_list_err ;
130
131
132
+ mr -> mr_xprt = r_xprt ;
131
133
mr -> frwr .fr_mr = frmr ;
132
134
mr -> mr_dir = DMA_NONE ;
133
135
INIT_LIST_HEAD (& mr -> mr_list );
Original file line number Diff line number Diff line change @@ -896,14 +896,12 @@ rpcrdma_mrs_create(struct rpcrdma_xprt *r_xprt)
896
896
if (!mr )
897
897
break ;
898
898
899
- rc = frwr_init_mr ( ia , mr );
899
+ rc = frwr_mr_init ( r_xprt , mr );
900
900
if (rc ) {
901
901
kfree (mr );
902
902
break ;
903
903
}
904
904
905
- mr -> mr_xprt = r_xprt ;
906
-
907
905
spin_lock (& buf -> rb_lock );
908
906
rpcrdma_mr_push (mr , & buf -> rb_mrs );
909
907
list_add (& mr -> mr_all , & buf -> rb_all_mrs );
Original file line number Diff line number Diff line change @@ -536,7 +536,7 @@ rpcrdma_data_dir(bool writing)
536
536
void frwr_reset (struct rpcrdma_req * req );
537
537
int frwr_query_device (struct rpcrdma_xprt * r_xprt ,
538
538
const struct ib_device * device );
539
- int frwr_init_mr (struct rpcrdma_ia * ia , struct rpcrdma_mr * mr );
539
+ int frwr_mr_init (struct rpcrdma_xprt * r_xprt , struct rpcrdma_mr * mr );
540
540
void frwr_release_mr (struct rpcrdma_mr * mr );
541
541
struct rpcrdma_mr_seg * frwr_map (struct rpcrdma_xprt * r_xprt ,
542
542
struct rpcrdma_mr_seg * seg ,
You can’t perform that action at this time.
0 commit comments