Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'batadv-next-pullrequest-20240405' of git://git.open-mesh.org/linux-merge

Simon Wunderlich says:

====================
This cleanup patchset includes the following patches:

- bump version strings, by Simon Wunderlich

- prefer kfree_rcu() over call_rcu() with free-only callbacks,
by Dmitry Antipov

- bypass empty buckets in batadv_purge_orig_ref(), by Eric Dumazet
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+6 -45
+1 -1
net/batman-adv/main.h
··· 13 13 #define BATADV_DRIVER_DEVICE "batman-adv" 14 14 15 15 #ifndef BATADV_SOURCE_VERSION 16 - #define BATADV_SOURCE_VERSION "2024.1" 16 + #define BATADV_SOURCE_VERSION "2024.2" 17 17 #endif 18 18 19 19 /* B.A.T.M.A.N. parameters */
+2
net/batman-adv/originator.c
··· 1266 1266 /* for all origins... */ 1267 1267 for (i = 0; i < hash->size; i++) { 1268 1268 head = &hash->table[i]; 1269 + if (hlist_empty(head)) 1270 + continue; 1269 1271 list_lock = &hash->list_locks[i]; 1270 1272 1271 1273 spin_lock_bh(list_lock);
+3 -44
net/batman-adv/translation-table.c
··· 209 209 } 210 210 211 211 /** 212 - * batadv_tt_local_entry_free_rcu() - free the tt_local_entry 213 - * @rcu: rcu pointer of the tt_local_entry 214 - */ 215 - static void batadv_tt_local_entry_free_rcu(struct rcu_head *rcu) 216 - { 217 - struct batadv_tt_local_entry *tt_local_entry; 218 - 219 - tt_local_entry = container_of(rcu, struct batadv_tt_local_entry, 220 - common.rcu); 221 - 222 - kmem_cache_free(batadv_tl_cache, tt_local_entry); 223 - } 224 - 225 - /** 226 212 * batadv_tt_local_entry_release() - release tt_local_entry from lists and queue 227 213 * for free after rcu grace period 228 214 * @ref: kref pointer of the nc_node ··· 222 236 223 237 batadv_softif_vlan_put(tt_local_entry->vlan); 224 238 225 - call_rcu(&tt_local_entry->common.rcu, batadv_tt_local_entry_free_rcu); 239 + kfree_rcu(tt_local_entry, common.rcu); 226 240 } 227 241 228 242 /** ··· 241 255 } 242 256 243 257 /** 244 - * batadv_tt_global_entry_free_rcu() - free the tt_global_entry 245 - * @rcu: rcu pointer of the tt_global_entry 246 - */ 247 - static void batadv_tt_global_entry_free_rcu(struct rcu_head *rcu) 248 - { 249 - struct batadv_tt_global_entry *tt_global_entry; 250 - 251 - tt_global_entry = container_of(rcu, struct batadv_tt_global_entry, 252 - common.rcu); 253 - 254 - kmem_cache_free(batadv_tg_cache, tt_global_entry); 255 - } 256 - 257 - /** 258 258 * batadv_tt_global_entry_release() - release tt_global_entry from lists and 259 259 * queue for free after rcu grace period 260 260 * @ref: kref pointer of the nc_node ··· 254 282 255 283 batadv_tt_global_del_orig_list(tt_global_entry); 256 284 257 - call_rcu(&tt_global_entry->common.rcu, batadv_tt_global_entry_free_rcu); 285 + kfree_rcu(tt_global_entry, common.rcu); 258 286 } 259 287 260 288 /** ··· 380 408 } 381 409 382 410 /** 383 - * batadv_tt_orig_list_entry_free_rcu() - free the orig_entry 384 - * @rcu: rcu pointer of the orig_entry 385 - */ 386 - static void batadv_tt_orig_list_entry_free_rcu(struct rcu_head *rcu) 387 - { 388 - struct batadv_tt_orig_list_entry *orig_entry; 389 - 390 - orig_entry = container_of(rcu, struct batadv_tt_orig_list_entry, rcu); 391 - 392 - kmem_cache_free(batadv_tt_orig_cache, orig_entry); 393 - } 394 - 395 - /** 396 411 * batadv_tt_orig_list_entry_release() - release tt orig entry from lists and 397 412 * queue for free after rcu grace period 398 413 * @ref: kref pointer of the tt orig entry ··· 392 433 refcount); 393 434 394 435 batadv_orig_node_put(orig_entry->orig_node); 395 - call_rcu(&orig_entry->rcu, batadv_tt_orig_list_entry_free_rcu); 436 + kfree_rcu(orig_entry, rcu); 396 437 } 397 438 398 439 /**