File tree 1 file changed +3
-11
lines changed 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -98,23 +98,15 @@ static void __xdp_rxq_info_unreg_mem_model(struct xdp_rxq_info *xdp_rxq)
98
98
{
99
99
struct xdp_mem_allocator * xa ;
100
100
int id = xdp_rxq -> mem .id ;
101
- int err ;
102
101
103
102
if (id == 0 )
104
103
return ;
105
104
106
105
mutex_lock (& mem_id_lock );
107
106
108
- xa = rhashtable_lookup (mem_id_ht , & id , mem_id_rht_params );
109
- if (!xa ) {
110
- mutex_unlock (& mem_id_lock );
111
- return ;
112
- }
113
-
114
- err = rhashtable_remove_fast (mem_id_ht , & xa -> node , mem_id_rht_params );
115
- WARN_ON (err );
116
-
117
- call_rcu (& xa -> rcu , __xdp_mem_allocator_rcu_free );
107
+ xa = rhashtable_lookup_fast (mem_id_ht , & id , mem_id_rht_params );
108
+ if (xa && !rhashtable_remove_fast (mem_id_ht , & xa -> node , mem_id_rht_params ))
109
+ call_rcu (& xa -> rcu , __xdp_mem_allocator_rcu_free );
118
110
119
111
mutex_unlock (& mem_id_lock );
120
112
}
You can’t perform that action at this time.
0 commit comments