File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -135,16 +135,20 @@ struct rxrpc_bundle *rxrpc_get_bundle(struct rxrpc_bundle *bundle)
135
135
return bundle ;
136
136
}
137
137
138
+ static void rxrpc_free_bundle (struct rxrpc_bundle * bundle )
139
+ {
140
+ rxrpc_put_peer (bundle -> params .peer );
141
+ kfree (bundle );
142
+ }
143
+
138
144
void rxrpc_put_bundle (struct rxrpc_bundle * bundle )
139
145
{
140
146
unsigned int d = bundle -> debug_id ;
141
147
unsigned int u = atomic_dec_return (& bundle -> usage );
142
148
143
149
_debug ("PUT B=%x %u" , d , u );
144
- if (u == 0 ) {
145
- rxrpc_put_peer (bundle -> params .peer );
146
- kfree (bundle );
147
- }
150
+ if (u == 0 )
151
+ rxrpc_free_bundle (bundle );
148
152
}
149
153
150
154
/*
@@ -328,7 +332,7 @@ static struct rxrpc_bundle *rxrpc_look_up_bundle(struct rxrpc_conn_parameters *c
328
332
return candidate ;
329
333
330
334
found_bundle_free :
331
- kfree (candidate );
335
+ rxrpc_free_bundle (candidate );
332
336
found_bundle :
333
337
rxrpc_get_bundle (bundle );
334
338
spin_unlock (& local -> client_bundles_lock );
You can’t perform that action at this time.
0 commit comments