@@ -140,8 +140,8 @@ static void io_buffer_unmap(struct io_ring_ctx *ctx, struct io_mapped_ubuf **slo
140
140
* slot = NULL ;
141
141
}
142
142
143
- static void io_rsrc_put_work_one (struct io_rsrc_data * rsrc_data ,
144
- struct io_rsrc_put * prsrc )
143
+ static void io_rsrc_put_work (struct io_rsrc_data * rsrc_data ,
144
+ struct io_rsrc_put * prsrc )
145
145
{
146
146
struct io_ring_ctx * ctx = rsrc_data -> ctx ;
147
147
@@ -150,16 +150,6 @@ static void io_rsrc_put_work_one(struct io_rsrc_data *rsrc_data,
150
150
rsrc_data -> do_put (ctx , prsrc );
151
151
}
152
152
153
- static void __io_rsrc_put_work (struct io_rsrc_node * ref_node )
154
- {
155
- struct io_rsrc_data * rsrc_data = ref_node -> rsrc_data ;
156
-
157
- if (likely (!ref_node -> empty ))
158
- io_rsrc_put_work_one (rsrc_data , & ref_node -> item );
159
-
160
- io_rsrc_node_destroy (rsrc_data -> ctx , ref_node );
161
- }
162
-
163
153
void io_rsrc_node_destroy (struct io_ring_ctx * ctx , struct io_rsrc_node * node )
164
154
{
165
155
if (!io_alloc_cache_put (& ctx -> rsrc_node_cache , & node -> cache ))
@@ -178,7 +168,10 @@ void io_rsrc_node_ref_zero(struct io_rsrc_node *node)
178
168
if (node -> refs )
179
169
break ;
180
170
list_del (& node -> node );
181
- __io_rsrc_put_work (node );
171
+
172
+ if (likely (!node -> empty ))
173
+ io_rsrc_put_work (node -> rsrc_data , & node -> item );
174
+ io_rsrc_node_destroy (ctx , node );
182
175
}
183
176
if (list_empty (& ctx -> rsrc_ref_list ) && unlikely (ctx -> rsrc_quiesce ))
184
177
wake_up_all (& ctx -> rsrc_quiesce_wq );
0 commit comments