summaryrefslogtreecommitdiff
path: root/net/batman-adv/originator.c
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2011-01-19 23:01:44 +0300
committerMarek Lindner <lindner_marek@yahoo.de>2011-03-05 14:52:04 +0300
commitd0072609baebaffb522083d367f4f195187f60f8 (patch)
tree44e014264e2a2815d63f09c6ba9283d2866cbf48 /net/batman-adv/originator.c
parent1605d0d60b66b9461cfcff86f8cfc80964f23430 (diff)
downloadlinux-d0072609baebaffb522083d367f4f195187f60f8.tar.xz
batman-adv: remove orig_hash spinlock
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/originator.c')
-rw-r--r--net/batman-adv/originator.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 69e27a243fd0..a8d0262e9d90 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -44,18 +44,15 @@ int originator_init(struct bat_priv *bat_priv)
if (bat_priv->orig_hash)
return 1;
- spin_lock_bh(&bat_priv->orig_hash_lock);
bat_priv->orig_hash = hash_new(1024);
if (!bat_priv->orig_hash)
goto err;
- spin_unlock_bh(&bat_priv->orig_hash_lock);
start_purge_timer(bat_priv);
return 1;
err:
- spin_unlock_bh(&bat_priv->orig_hash_lock);
return 0;
}
@@ -159,7 +156,6 @@ void originator_free(struct bat_priv *bat_priv)
cancel_delayed_work_sync(&bat_priv->orig_work);
- spin_lock_bh(&bat_priv->orig_hash_lock);
bat_priv->orig_hash = NULL;
for (i = 0; i < hash->size; i++) {
@@ -177,7 +173,6 @@ void originator_free(struct bat_priv *bat_priv)
}
hash_destroy(hash);
- spin_unlock_bh(&bat_priv->orig_hash_lock);
}
/* this function finds or creates an originator entry for the given
@@ -342,8 +337,6 @@ static void _purge_orig(struct bat_priv *bat_priv)
if (!hash)
return;
- spin_lock_bh(&bat_priv->orig_hash_lock);
-
/* for all origins... */
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
@@ -367,8 +360,6 @@ static void _purge_orig(struct bat_priv *bat_priv)
spin_unlock_bh(list_lock);
}
- spin_unlock_bh(&bat_priv->orig_hash_lock);
-
gw_node_purge(bat_priv);
gw_election(bat_priv);
@@ -425,8 +416,6 @@ int orig_seq_print_text(struct seq_file *seq, void *offset)
"Originator", "last-seen", "#", TQ_MAX_VALUE, "Nexthop",
"outgoingIF", "Potential nexthops");
- spin_lock_bh(&bat_priv->orig_hash_lock);
-
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
@@ -462,8 +451,6 @@ int orig_seq_print_text(struct seq_file *seq, void *offset)
rcu_read_unlock();
}
- spin_unlock_bh(&bat_priv->orig_hash_lock);
-
if ((batman_count == 0))
seq_printf(seq, "No batman nodes in range ...\n");
@@ -511,8 +498,6 @@ int orig_hash_add_if(struct batman_if *batman_if, int max_if_num)
/* resize all orig nodes because orig_node->bcast_own(_sum) depend on
* if_num */
- spin_lock_bh(&bat_priv->orig_hash_lock);
-
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
@@ -528,12 +513,10 @@ int orig_hash_add_if(struct batman_if *batman_if, int max_if_num)
rcu_read_unlock();
}
- spin_unlock_bh(&bat_priv->orig_hash_lock);
return 0;
err:
rcu_read_unlock();
- spin_unlock_bh(&bat_priv->orig_hash_lock);
return -ENOMEM;
}
@@ -601,8 +584,6 @@ int orig_hash_del_if(struct batman_if *batman_if, int max_if_num)
/* resize all orig nodes because orig_node->bcast_own(_sum) depend on
* if_num */
- spin_lock_bh(&bat_priv->orig_hash_lock);
-
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
@@ -637,11 +618,9 @@ int orig_hash_del_if(struct batman_if *batman_if, int max_if_num)
rcu_read_unlock();
batman_if->if_num = -1;
- spin_unlock_bh(&bat_priv->orig_hash_lock);
return 0;
err:
rcu_read_unlock();
- spin_unlock_bh(&bat_priv->orig_hash_lock);
return -ENOMEM;
}