@@ -230,43 +230,6 @@ struct mb_cache_entry *mb_cache_entry_get(struct mb_cache *cache, u32 key,
230
230
}
231
231
EXPORT_SYMBOL (mb_cache_entry_get );
232
232
233
- /* mb_cache_entry_delete - try to remove a cache entry
234
- * @cache - cache we work with
235
- * @key - key
236
- * @value - value
237
- *
238
- * Remove entry from cache @cache with key @key and value @value.
239
- */
240
- void mb_cache_entry_delete (struct mb_cache * cache , u32 key , u64 value )
241
- {
242
- struct hlist_bl_node * node ;
243
- struct hlist_bl_head * head ;
244
- struct mb_cache_entry * entry ;
245
-
246
- head = mb_cache_entry_head (cache , key );
247
- hlist_bl_lock (head );
248
- hlist_bl_for_each_entry (entry , node , head , e_hash_list ) {
249
- if (entry -> e_key == key && entry -> e_value == value ) {
250
- /* We keep hash list reference to keep entry alive */
251
- hlist_bl_del_init (& entry -> e_hash_list );
252
- hlist_bl_unlock (head );
253
- spin_lock (& cache -> c_list_lock );
254
- if (!list_empty (& entry -> e_list )) {
255
- list_del_init (& entry -> e_list );
256
- if (!WARN_ONCE (cache -> c_entry_count == 0 ,
257
- "mbcache: attempt to decrement c_entry_count past zero" ))
258
- cache -> c_entry_count -- ;
259
- atomic_dec (& entry -> e_refcnt );
260
- }
261
- spin_unlock (& cache -> c_list_lock );
262
- mb_cache_entry_put (cache , entry );
263
- return ;
264
- }
265
- }
266
- hlist_bl_unlock (head );
267
- }
268
- EXPORT_SYMBOL (mb_cache_entry_delete );
269
-
270
233
/* mb_cache_entry_delete_or_get - remove a cache entry if it has no users
271
234
* @cache - cache we work with
272
235
* @key - key
0 commit comments