@@ -44,18 +44,15 @@ int originator_init(struct bat_priv *bat_priv)
4444 if (bat_priv -> orig_hash )
4545 return 1 ;
4646
47- spin_lock_bh (& bat_priv -> orig_hash_lock );
4847 bat_priv -> orig_hash = hash_new (1024 );
4948
5049 if (!bat_priv -> orig_hash )
5150 goto err ;
5251
53- spin_unlock_bh (& bat_priv -> orig_hash_lock );
5452 start_purge_timer (bat_priv );
5553 return 1 ;
5654
5755err :
58- spin_unlock_bh (& bat_priv -> orig_hash_lock );
5956 return 0 ;
6057}
6158
@@ -159,7 +156,6 @@ void originator_free(struct bat_priv *bat_priv)
159156
160157 cancel_delayed_work_sync (& bat_priv -> orig_work );
161158
162- spin_lock_bh (& bat_priv -> orig_hash_lock );
163159 bat_priv -> orig_hash = NULL ;
164160
165161 for (i = 0 ; i < hash -> size ; i ++ ) {
@@ -177,7 +173,6 @@ void originator_free(struct bat_priv *bat_priv)
177173 }
178174
179175 hash_destroy (hash );
180- spin_unlock_bh (& bat_priv -> orig_hash_lock );
181176}
182177
183178/* this function finds or creates an originator entry for the given
@@ -342,8 +337,6 @@ static void _purge_orig(struct bat_priv *bat_priv)
342337 if (!hash )
343338 return ;
344339
345- spin_lock_bh (& bat_priv -> orig_hash_lock );
346-
347340 /* for all origins... */
348341 for (i = 0 ; i < hash -> size ; i ++ ) {
349342 head = & hash -> table [i ];
@@ -367,8 +360,6 @@ static void _purge_orig(struct bat_priv *bat_priv)
367360 spin_unlock_bh (list_lock );
368361 }
369362
370- spin_unlock_bh (& bat_priv -> orig_hash_lock );
371-
372363 gw_node_purge (bat_priv );
373364 gw_election (bat_priv );
374365
@@ -425,8 +416,6 @@ int orig_seq_print_text(struct seq_file *seq, void *offset)
425416 "Originator" , "last-seen" , "#" , TQ_MAX_VALUE , "Nexthop" ,
426417 "outgoingIF" , "Potential nexthops" );
427418
428- spin_lock_bh (& bat_priv -> orig_hash_lock );
429-
430419 for (i = 0 ; i < hash -> size ; i ++ ) {
431420 head = & hash -> table [i ];
432421
@@ -462,8 +451,6 @@ int orig_seq_print_text(struct seq_file *seq, void *offset)
462451 rcu_read_unlock ();
463452 }
464453
465- spin_unlock_bh (& bat_priv -> orig_hash_lock );
466-
467454 if ((batman_count == 0 ))
468455 seq_printf (seq , "No batman nodes in range ...\n" );
469456
@@ -511,8 +498,6 @@ int orig_hash_add_if(struct batman_if *batman_if, int max_if_num)
511498
512499 /* resize all orig nodes because orig_node->bcast_own(_sum) depend on
513500 * if_num */
514- spin_lock_bh (& bat_priv -> orig_hash_lock );
515-
516501 for (i = 0 ; i < hash -> size ; i ++ ) {
517502 head = & hash -> table [i ];
518503
@@ -528,12 +513,10 @@ int orig_hash_add_if(struct batman_if *batman_if, int max_if_num)
528513 rcu_read_unlock ();
529514 }
530515
531- spin_unlock_bh (& bat_priv -> orig_hash_lock );
532516 return 0 ;
533517
534518err :
535519 rcu_read_unlock ();
536- spin_unlock_bh (& bat_priv -> orig_hash_lock );
537520 return - ENOMEM ;
538521}
539522
@@ -601,8 +584,6 @@ int orig_hash_del_if(struct batman_if *batman_if, int max_if_num)
601584
602585 /* resize all orig nodes because orig_node->bcast_own(_sum) depend on
603586 * if_num */
604- spin_lock_bh (& bat_priv -> orig_hash_lock );
605-
606587 for (i = 0 ; i < hash -> size ; i ++ ) {
607588 head = & hash -> table [i ];
608589
@@ -637,11 +618,9 @@ int orig_hash_del_if(struct batman_if *batman_if, int max_if_num)
637618 rcu_read_unlock ();
638619
639620 batman_if -> if_num = -1 ;
640- spin_unlock_bh (& bat_priv -> orig_hash_lock );
641621 return 0 ;
642622
643623err :
644624 rcu_read_unlock ();
645- spin_unlock_bh (& bat_priv -> orig_hash_lock );
646625 return - ENOMEM ;
647626}
0 commit comments