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
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEE1ilQI7G+y+fdhnrfoSvjmEKSnqEFAmYPuJwWHHN3QHNpbW9u
 d3VuZGVybGljaC5kZQAKCRChK+OYQpKeoRHzEACY5OuAfEzmqn6eUi4IocRCmSvL
 YVYZgFKKOu5x6PX0UVWQbsgqneaKCWx3RQUzUHYbNxTMmGtIaVSsZnRrUzgwfVFO
 jO0/9FiuvHq1csSoYmpEyFXRsDCeca9UTrFJWoqolLnZbcwYbYWz++XMfMzEmA7m
 wEOe4T/REgoAH4l4nCuMWfo4yUoApsJv0SSk6eYNqaAiBFN33zr98mNKyUWChfwS
 JYb1i2/sZDq7mInJHIKb/DbNud0DAQJsYY8lQ4r3UMp52gtjYf/aeNsfedjilWow
 0JJ/dsiNBj0MKQ8VgGk+O+GwqeehH1HfRSeaIJM0mbFW2RbIzZotxhk/Qd0d13nR
 90Q9nHVshHpiUP7zx8hgpzES65JwwnfuJn3yZltbAbOZzeeA0945kHycCCclAZN1
 vGTacejzANbrTKloekLELgisWz+6EBrc24Xvz7aVeGj2z+x4ltIU5F5YQ1b5jEL8
 2OzdXjwRTDDGOGufTXEfT6Oh36ofiX2hTVcj190ODaYiFiFl9sMdPPTvRiBBsbeq
 IXN5yMtYZy/pxoB8/4+I60if4rLKMJmIiMUumAgkW31vibjWOVW/Z7oxFda2VGMO
 /RHzQ8JnSXVGiSR6oiEQEaglrxojgdSM90GGjdIsLRjlCV4YQZ6hjYYLU+7muhr2
 I+7c3yeGAa1nY9aZkA==
 =AUfY
 -----END PGP SIGNATURE-----

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>
This commit is contained in:
David S. Miller 2024-04-08 11:37:27 +01:00
commit d7d6e47016
3 changed files with 6 additions and 45 deletions

View File

@ -13,7 +13,7 @@
#define BATADV_DRIVER_DEVICE "batman-adv"
#ifndef BATADV_SOURCE_VERSION
#define BATADV_SOURCE_VERSION "2024.1"
#define BATADV_SOURCE_VERSION "2024.2"
#endif
/* B.A.T.M.A.N. parameters */

View File

@ -1266,6 +1266,8 @@ void batadv_purge_orig_ref(struct batadv_priv *bat_priv)
/* for all origins... */
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
if (hlist_empty(head))
continue;
list_lock = &hash->list_locks[i];
spin_lock_bh(list_lock);

View File

@ -208,20 +208,6 @@ batadv_tt_global_hash_find(struct batadv_priv *bat_priv, const u8 *addr,
return tt_global_entry;
}
/**
* batadv_tt_local_entry_free_rcu() - free the tt_local_entry
* @rcu: rcu pointer of the tt_local_entry
*/
static void batadv_tt_local_entry_free_rcu(struct rcu_head *rcu)
{
struct batadv_tt_local_entry *tt_local_entry;
tt_local_entry = container_of(rcu, struct batadv_tt_local_entry,
common.rcu);
kmem_cache_free(batadv_tl_cache, tt_local_entry);
}
/**
* batadv_tt_local_entry_release() - release tt_local_entry from lists and queue
* for free after rcu grace period
@ -236,7 +222,7 @@ static void batadv_tt_local_entry_release(struct kref *ref)
batadv_softif_vlan_put(tt_local_entry->vlan);
call_rcu(&tt_local_entry->common.rcu, batadv_tt_local_entry_free_rcu);
kfree_rcu(tt_local_entry, common.rcu);
}
/**
@ -254,20 +240,6 @@ batadv_tt_local_entry_put(struct batadv_tt_local_entry *tt_local_entry)
batadv_tt_local_entry_release);
}
/**
* batadv_tt_global_entry_free_rcu() - free the tt_global_entry
* @rcu: rcu pointer of the tt_global_entry
*/
static void batadv_tt_global_entry_free_rcu(struct rcu_head *rcu)
{
struct batadv_tt_global_entry *tt_global_entry;
tt_global_entry = container_of(rcu, struct batadv_tt_global_entry,
common.rcu);
kmem_cache_free(batadv_tg_cache, tt_global_entry);
}
/**
* batadv_tt_global_entry_release() - release tt_global_entry from lists and
* queue for free after rcu grace period
@ -282,7 +254,7 @@ void batadv_tt_global_entry_release(struct kref *ref)
batadv_tt_global_del_orig_list(tt_global_entry);
call_rcu(&tt_global_entry->common.rcu, batadv_tt_global_entry_free_rcu);
kfree_rcu(tt_global_entry, common.rcu);
}
/**
@ -407,19 +379,6 @@ static void batadv_tt_global_size_dec(struct batadv_orig_node *orig_node,
batadv_tt_global_size_mod(orig_node, vid, -1);
}
/**
* batadv_tt_orig_list_entry_free_rcu() - free the orig_entry
* @rcu: rcu pointer of the orig_entry
*/
static void batadv_tt_orig_list_entry_free_rcu(struct rcu_head *rcu)
{
struct batadv_tt_orig_list_entry *orig_entry;
orig_entry = container_of(rcu, struct batadv_tt_orig_list_entry, rcu);
kmem_cache_free(batadv_tt_orig_cache, orig_entry);
}
/**
* batadv_tt_orig_list_entry_release() - release tt orig entry from lists and
* queue for free after rcu grace period
@ -433,7 +392,7 @@ static void batadv_tt_orig_list_entry_release(struct kref *ref)
refcount);
batadv_orig_node_put(orig_entry->orig_node);
call_rcu(&orig_entry->rcu, batadv_tt_orig_list_entry_free_rcu);
kfree_rcu(orig_entry, rcu);
}
/**