From patchwork Mon Nov 29 17:00:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 592 Return-Path: Received: from nm12-vm0.bullet.mail.ukl.yahoo.com (nm12-vm0.bullet.mail.ukl.yahoo.com [217.146.183.246]) by open-mesh.org (Postfix) with SMTP id 00D5D154609 for ; Mon, 29 Nov 2010 18:03:47 +0100 (CET) Received: from [217.146.183.211] by nm12.bullet.mail.ukl.yahoo.com with NNFMP; 29 Nov 2010 17:03:47 -0000 Received: from [217.146.183.179] by tm4.bullet.mail.ukl.yahoo.com with NNFMP; 29 Nov 2010 17:03:47 -0000 Received: from [127.0.0.1] by omp1020.mail.ukl.yahoo.com with NNFMP; 29 Nov 2010 17:03:47 -0000 X-Yahoo-Newman-Id: 412950.11842.bm@omp1020.mail.ukl.yahoo.com Received: (qmail 61783 invoked from network); 29 Nov 2010 17:03:47 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References; b=xJHjmGU/ZLE+WZRfsJ+PmnY3AkSmUUar5XZCe5EgFEZqvQNrlyZf6/2OBgfH4pL0fydQeTGPj/al/NYQ1TmML+ODxo8EObIBJLkDXtt9uZjJgEDYjKcv/TCHpvLhaEHWuEo9ENc4Bhr9SautwC11oTbfYYnNO+UB3XVVy7eBrIg= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1291050227; bh=ZMjVnKRytN5aPV06KJA88ixGwmgjoHh/3yEl4poEzWk=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References; b=emrdL6V7YmdMHZ7cIMZ2wbvDa4RoIOp1pLA54ZQ4LAnGf2KNI0LLePeZ2fAiSVUw5DeMLSFIqKj2YbSvvplKs5+dXxJzh1I+K+uRS9Bzk4ZD9OXJsigkK5W8pfSduSi1M88GVLTlj0DedVFZNGbhbJjffdk0zWGae/fjbqh9Fb8= Received: from localhost (lindner_marek@81.57.254.118 with plain) by smtp120.mail.ukl.yahoo.com with SMTP; 29 Nov 2010 09:03:42 -0800 PST X-Yahoo-SMTP: tW.h3tiswBBMXO2coYcbPigGD5Lt6zY_.Zc- X-YMail-OSG: 0nzvdOUVM1kL92vG_Dkw3Mv2CzRK3ZU7BR2a1EiwkXF5Ae0 A8RxjYjODHHnl0mIkuzBfAfqSiecVkBYtMw7IQHJwEZHNbuqUlIo5MxqnnGq tzz.rhkAnXOg1paytZPOLzD1X7BaDbJdWgJZ3NE0rDe3jNUMWw8BZkIuqZqw r7eTN8gVDcnRD3MWmzlBkRH7gDLRGINu2jGQZ2wzdZsDHuV1ab6EMOL_0qPg TfiiG2WUtsqbbTziEbjThVIsFz3IwxiMknPG2mTjoxpkb8XlBYWpoohTUOT5 NSw3S1u1tXtnLj9mHJ2vRBEAfhw-- X-Yahoo-Newman-Property: ymail-3 From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 29 Nov 2010 18:00:30 +0100 Message-Id: <1291050032-20169-7-git-send-email-lindner_marek@yahoo.de> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <201011291800.02971.lindner_marek@yahoo.de> References: <201011291800.02971.lindner_marek@yahoo.de> Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH 7/9] batman-adv: replace orig_hash hash_iterate() with individual functions X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2010 17:03:48 -0000 Signed-off-by: Marek Lindner --- batman-adv/originator.c | 212 +++++++++++++++++++++++++++++++++-------------- batman-adv/routing.c | 32 ++++++-- batman-adv/vis.c | 157 ++++++++++++++++++++++------------ 3 files changed, 275 insertions(+), 126 deletions(-) diff --git a/batman-adv/originator.c b/batman-adv/originator.c index 58c479d..d573a5b 100644 --- a/batman-adv/originator.c +++ b/batman-adv/originator.c @@ -133,26 +133,44 @@ void orig_node_free_ref(struct kref *refcount) void originator_free(struct bat_priv *bat_priv) { - HASHIT(hashit); + struct hashtable_t *hash = bat_priv->orig_hash; + struct hlist_node *walk, *safe; + struct hlist_head *head; struct element_t *bucket; + spinlock_t *list_lock; struct orig_node *orig_node; + int i, ret; - if (!bat_priv->orig_hash) + if (!hash) return; 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++) { + rcu_read_lock(); + ret = hlist_empty(&hash->table[i]); + rcu_read_unlock(); + + if (ret) + continue; - while (hash_iterate(bat_priv->orig_hash, &hashit)) { - bucket = hlist_entry(hashit.walk, struct element_t, hlist); - orig_node = bucket->data; + head = &hash->table[i]; + list_lock = &hash->list_locks[i]; - hash_remove_bucket(bat_priv->orig_hash, &hashit); - kref_put(&orig_node->refcount, orig_node_free_ref); + spin_lock_bh(list_lock); + hlist_for_each_entry_safe(bucket, walk, safe, head, hlist) { + hlist_del_rcu(walk); + orig_node = bucket->data; + kref_put(&orig_node->refcount, orig_node_free_ref); + call_rcu(&bucket->rcu, bucket_free_rcu); + } + spin_unlock_bh(list_lock); } - bat_priv->orig_hash = NULL; + hash_destroy(hash); spin_unlock_bh(&bat_priv->orig_hash_lock); } @@ -307,27 +325,52 @@ static bool purge_orig_node(struct bat_priv *bat_priv, static void _purge_orig(struct bat_priv *bat_priv) { - HASHIT(hashit); + struct hashtable_t *hash = bat_priv->orig_hash; + struct hlist_node *walk, *safe; + struct hlist_head *head; struct element_t *bucket; + spinlock_t *list_lock; struct orig_node *orig_node; + int i, ret; + + if (!hash) + return; spin_lock_bh(&bat_priv->orig_hash_lock); /* for all origins... */ - while (hash_iterate(bat_priv->orig_hash, &hashit)) { - bucket = hlist_entry(hashit.walk, struct element_t, hlist); - orig_node = bucket->data; - - if (purge_orig_node(bat_priv, orig_node)) { - if (orig_node->gw_flags) - gw_node_delete(bat_priv, orig_node); - hash_remove_bucket(bat_priv->orig_hash, &hashit); - kref_put(&orig_node->refcount, orig_node_free_ref); - } + for (i = 0; i < hash->size; i++) { + rcu_read_lock(); + ret = hlist_empty(&hash->table[i]); + rcu_read_unlock(); + + if (ret) + continue; - if (time_after(jiffies, (orig_node->last_frag_packet + + head = &hash->table[i]; + list_lock = &hash->list_locks[i]; + + spin_lock_bh(list_lock); + hlist_for_each_entry_safe(bucket, walk, safe, head, hlist) { + orig_node = bucket->data; + + if (purge_orig_node(bat_priv, orig_node)) { + if (orig_node->gw_flags) + gw_node_delete(bat_priv, orig_node); + hlist_del_rcu(walk); + kref_put(&orig_node->refcount, + orig_node_free_ref); + call_rcu(&bucket->rcu, bucket_free_rcu); + hash->elements--; + continue; + } + + if (time_after(jiffies, (orig_node->last_frag_packet + msecs_to_jiffies(FRAG_TIMEOUT)))) - frag_list_free(&orig_node->frag_list); + frag_list_free(&orig_node->frag_list); + + } + spin_unlock_bh(list_lock); } spin_unlock_bh(&bat_priv->orig_hash_lock); @@ -356,16 +399,18 @@ void purge_orig_ref(struct bat_priv *bat_priv) int orig_seq_print_text(struct seq_file *seq, void *offset) { - HASHIT(hashit); - struct hlist_node *node; - struct element_t *bucket; struct net_device *net_dev = (struct net_device *)seq->private; struct bat_priv *bat_priv = netdev_priv(net_dev); + struct hashtable_t *hash = bat_priv->orig_hash; + struct hlist_node *walk, *node; + struct hlist_head *head; + struct element_t *bucket; struct orig_node *orig_node; struct neigh_node *neigh_node; int batman_count = 0; int last_seen_secs; int last_seen_msecs; + int i, ret; if ((!bat_priv->primary_if) || (bat_priv->primary_if->if_status != IF_ACTIVE)) { @@ -389,36 +434,48 @@ int orig_seq_print_text(struct seq_file *seq, void *offset) spin_lock_bh(&bat_priv->orig_hash_lock); - while (hash_iterate(bat_priv->orig_hash, &hashit)) { - bucket = hlist_entry(hashit.walk, struct element_t, hlist); - orig_node = bucket->data; + for (i = 0; i < hash->size; i++) { + rcu_read_lock(); + ret = hlist_empty(&hash->table[i]); + rcu_read_unlock(); - if (!orig_node->router) + if (ret) continue; - if (orig_node->router->tq_avg == 0) - continue; + head = &hash->table[i]; + + rcu_read_lock(); + hlist_for_each_entry_rcu(bucket, walk, head, hlist) { + orig_node = bucket->data; + + if (!orig_node->router) + continue; - last_seen_secs = jiffies_to_msecs(jiffies - + if (orig_node->router->tq_avg == 0) + continue; + + last_seen_secs = jiffies_to_msecs(jiffies - orig_node->last_valid) / 1000; - last_seen_msecs = jiffies_to_msecs(jiffies - + last_seen_msecs = jiffies_to_msecs(jiffies - orig_node->last_valid) % 1000; - seq_printf(seq, "%pM %4i.%03is (%3i) %pM [%10s]:", - orig_node->orig, last_seen_secs, last_seen_msecs, - orig_node->router->tq_avg, orig_node->router->addr, - orig_node->router->if_incoming->net_dev->name); - - rcu_read_lock(); - hlist_for_each_entry(neigh_node, node, - &orig_node->neigh_list, list) { - seq_printf(seq, " %pM (%3i)", neigh_node->addr, - neigh_node->tq_avg); + neigh_node = orig_node->router; + seq_printf(seq, "%pM %4i.%03is (%3i) %pM [%10s]:", + orig_node->orig, last_seen_secs, + last_seen_msecs, neigh_node->tq_avg, + neigh_node->addr, + neigh_node->if_incoming->net_dev->name); + + hlist_for_each_entry(neigh_node, node, + &orig_node->neigh_list, list) { + seq_printf(seq, " %pM (%3i)", neigh_node->addr, + neigh_node->tq_avg); + } + + seq_printf(seq, "\n"); + batman_count++; } rcu_read_unlock(); - - seq_printf(seq, "\n"); - batman_count++; } spin_unlock_bh(&bat_priv->orig_hash_lock); @@ -462,26 +519,42 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num) int orig_hash_add_if(struct batman_if *batman_if, int max_if_num) { struct bat_priv *bat_priv = netdev_priv(batman_if->soft_iface); - struct orig_node *orig_node; - HASHIT(hashit); + struct hashtable_t *hash = bat_priv->orig_hash; + struct hlist_node *walk; + struct hlist_head *head; struct element_t *bucket; + struct orig_node *orig_node; + int i, ret; /* resize all orig nodes because orig_node->bcast_own(_sum) depend on * if_num */ spin_lock_bh(&bat_priv->orig_hash_lock); - while (hash_iterate(bat_priv->orig_hash, &hashit)) { - bucket = hlist_entry(hashit.walk, struct element_t, hlist); - orig_node = bucket->data; + for (i = 0; i < hash->size; i++) { + rcu_read_lock(); + ret = hlist_empty(&hash->table[i]); + rcu_read_unlock(); + + if (ret) + continue; + + head = &hash->table[i]; - if (orig_node_add_if(orig_node, max_if_num) == -1) - goto err; + rcu_read_lock(); + hlist_for_each_entry_rcu(bucket, walk, head, hlist) { + orig_node = bucket->data; + + if (orig_node_add_if(orig_node, max_if_num) == -1) + goto err; + } + 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; } @@ -541,25 +614,39 @@ free_own_sum: int orig_hash_del_if(struct batman_if *batman_if, int max_if_num) { struct bat_priv *bat_priv = netdev_priv(batman_if->soft_iface); + struct hashtable_t *hash = bat_priv->orig_hash; + struct hlist_node *walk; + struct hlist_head *head; + struct element_t *bucket; struct batman_if *batman_if_tmp; struct orig_node *orig_node; - HASHIT(hashit); - struct element_t *bucket; - int ret; + int i, ret; /* resize all orig nodes because orig_node->bcast_own(_sum) depend on * if_num */ spin_lock_bh(&bat_priv->orig_hash_lock); - while (hash_iterate(bat_priv->orig_hash, &hashit)) { - bucket = hlist_entry(hashit.walk, struct element_t, hlist); - orig_node = bucket->data; + for (i = 0; i < hash->size; i++) { + rcu_read_lock(); + ret = hlist_empty(&hash->table[i]); + rcu_read_unlock(); + + if (ret) + continue; + + head = &hash->table[i]; + + rcu_read_lock(); + hlist_for_each_entry_rcu(bucket, walk, head, hlist) { + orig_node = bucket->data; - ret = orig_node_del_if(orig_node, max_if_num, - batman_if->if_num); + ret = orig_node_del_if(orig_node, max_if_num, + batman_if->if_num); - if (ret == -1) - goto err; + if (ret == -1) + goto err; + } + rcu_read_unlock(); } /* renumber remaining batman interfaces _inside_ of orig_hash_lock */ @@ -584,6 +671,7 @@ int orig_hash_del_if(struct batman_if *batman_if, int max_if_num) return 0; err: + rcu_read_unlock(); spin_unlock_bh(&bat_priv->orig_hash_lock); return -ENOMEM; } diff --git a/batman-adv/routing.c b/batman-adv/routing.c index 35abe00..69de72c 100644 --- a/batman-adv/routing.c +++ b/batman-adv/routing.c @@ -39,21 +39,37 @@ void slide_own_bcast_window(struct batman_if *batman_if) { struct bat_priv *bat_priv = netdev_priv(batman_if->soft_iface); - HASHIT(hashit); + struct hashtable_t *hash = bat_priv->orig_hash; + struct hlist_node *walk; + struct hlist_head *head; struct element_t *bucket; struct orig_node *orig_node; TYPE_OF_WORD *word; + int ret, i; spin_lock_bh(&bat_priv->orig_hash_lock); - while (hash_iterate(bat_priv->orig_hash, &hashit)) { - bucket = hlist_entry(hashit.walk, struct element_t, hlist); - orig_node = bucket->data; - word = &(orig_node->bcast_own[batman_if->if_num * NUM_WORDS]); + for (i = 0; i < hash->size; i++) { + rcu_read_lock(); + ret = hlist_empty(&hash->table[i]); + rcu_read_unlock(); + + if (ret) + continue; + + head = &hash->table[i]; - bit_get_packet(bat_priv, word, 1, 0); - orig_node->bcast_own_sum[batman_if->if_num] = - bit_packet_count(word); + rcu_read_lock(); + hlist_for_each_entry_rcu(bucket, walk, head, hlist) { + orig_node = bucket->data; + word = &(orig_node->bcast_own[batman_if->if_num * + NUM_WORDS]); + + bit_get_packet(bat_priv, word, 1, 0); + orig_node->bcast_own_sum[batman_if->if_num] = + bit_packet_count(word); + } + rcu_read_unlock(); } spin_unlock_bh(&bat_priv->orig_hash_lock); diff --git a/batman-adv/vis.c b/batman-adv/vis.c index 3af2506..fe7ad15 100644 --- a/batman-adv/vis.c +++ b/batman-adv/vis.c @@ -513,24 +513,40 @@ end: static int find_best_vis_server(struct bat_priv *bat_priv, struct vis_info *info) { - HASHIT(hashit); + struct hashtable_t *hash = bat_priv->orig_hash; + struct hlist_node *walk; + struct hlist_head *head; struct element_t *bucket; struct orig_node *orig_node; struct vis_packet *packet; - int best_tq = -1; + int best_tq = -1, i, ret; packet = (struct vis_packet *)info->skb_packet->data; - while (hash_iterate(bat_priv->orig_hash, &hashit)) { - bucket = hlist_entry(hashit.walk, struct element_t, hlist); - orig_node = bucket->data; - if ((orig_node) && (orig_node->router) && - (orig_node->flags & VIS_SERVER) && - (orig_node->router->tq_avg > best_tq)) { - best_tq = orig_node->router->tq_avg; - memcpy(packet->target_orig, orig_node->orig, ETH_ALEN); + for (i = 0; i < hash->size; i++) { + rcu_read_lock(); + ret = hlist_empty(&hash->table[i]); + rcu_read_unlock(); + + if (ret) + continue; + + head = &hash->table[i]; + + rcu_read_lock(); + hlist_for_each_entry_rcu(bucket, walk, head, hlist) { + orig_node = bucket->data; + if ((orig_node) && (orig_node->router) && + (orig_node->flags & VIS_SERVER) && + (orig_node->router->tq_avg > best_tq)) { + best_tq = orig_node->router->tq_avg; + memcpy(packet->target_orig, + orig_node->orig, ETH_ALEN); + } } + rcu_read_unlock(); } + return best_tq; } @@ -551,14 +567,17 @@ static bool vis_packet_full(struct vis_info *info) static int generate_vis_packet(struct bat_priv *bat_priv) { HASHIT(hashit_local); - HASHIT(hashit_global); + struct hashtable_t *hash = bat_priv->orig_hash; + struct hlist_node *walk; + struct hlist_head *head; struct element_t *bucket; struct orig_node *orig_node; + struct neigh_node *neigh_node; struct vis_info *info = (struct vis_info *)bat_priv->my_vis_info; struct vis_packet *packet = (struct vis_packet *)info->skb_packet->data; struct vis_info_entry *entry; struct hna_local_entry *hna_local_entry; - int best_tq = -1; + int best_tq = -1, i, ret; info->first_seen = jiffies; packet->vis_type = atomic_read(&bat_priv->vis_mode); @@ -579,37 +598,49 @@ static int generate_vis_packet(struct bat_priv *bat_priv) } } - while (hash_iterate(bat_priv->orig_hash, &hashit_global)) { - bucket = hlist_entry(hashit_global.walk, struct element_t, - hlist); - orig_node = bucket->data; + for (i = 0; i < hash->size; i++) { + rcu_read_lock(); + ret = hlist_empty(&hash->table[i]); + rcu_read_unlock(); - if (!orig_node->router) + if (ret) continue; - if (!compare_orig(orig_node->router->addr, orig_node->orig)) - continue; + head = &hash->table[i]; - if (orig_node->router->if_incoming->if_status != IF_ACTIVE) - continue; + rcu_read_lock(); + hlist_for_each_entry_rcu(bucket, walk, head, hlist) { + orig_node = bucket->data; + neigh_node = orig_node->router; - if (orig_node->router->tq_avg < 1) - continue; + if (!neigh_node) + continue; - /* fill one entry into buffer. */ - entry = (struct vis_info_entry *) - skb_put(info->skb_packet, sizeof(*entry)); - memcpy(entry->src, - orig_node->router->if_incoming->net_dev->dev_addr, - ETH_ALEN); - memcpy(entry->dest, orig_node->orig, ETH_ALEN); - entry->quality = orig_node->router->tq_avg; - packet->entries++; + if (!compare_orig(neigh_node->addr, orig_node->orig)) + continue; - if (vis_packet_full(info)) { - spin_unlock_bh(&bat_priv->orig_hash_lock); - return 0; + if (neigh_node->if_incoming->if_status != IF_ACTIVE) + continue; + + if (neigh_node->tq_avg < 1) + continue; + + /* fill one entry into buffer. */ + entry = (struct vis_info_entry *) + skb_put(info->skb_packet, sizeof(*entry)); + memcpy(entry->src, + neigh_node->if_incoming->net_dev->dev_addr, + ETH_ALEN); + memcpy(entry->dest, orig_node->orig, ETH_ALEN); + entry->quality = neigh_node->tq_avg; + packet->entries++; + + if (vis_packet_full(info)) { + spin_unlock_bh(&bat_priv->orig_hash_lock); + return 0; + } } + rcu_read_unlock(); } spin_unlock_bh(&bat_priv->orig_hash_lock); @@ -664,45 +695,59 @@ static void purge_vis_packets(struct bat_priv *bat_priv) static void broadcast_vis_packet(struct bat_priv *bat_priv, struct vis_info *info) { - HASHIT(hashit); + struct hashtable_t *hash = bat_priv->orig_hash; + struct hlist_node *walk; + struct hlist_head *head; struct element_t *bucket; struct orig_node *orig_node; struct vis_packet *packet; struct sk_buff *skb; struct batman_if *batman_if; uint8_t dstaddr[ETH_ALEN]; + int i, ret; spin_lock_bh(&bat_priv->orig_hash_lock); packet = (struct vis_packet *)info->skb_packet->data; /* send to all routers in range. */ - while (hash_iterate(bat_priv->orig_hash, &hashit)) { - bucket = hlist_entry(hashit.walk, struct element_t, hlist); - orig_node = bucket->data; + for (i = 0; i < hash->size; i++) { + rcu_read_lock(); + ret = hlist_empty(&hash->table[i]); + rcu_read_unlock(); - /* if it's a vis server and reachable, send it. */ - if ((!orig_node) || (!orig_node->router)) - continue; - if (!(orig_node->flags & VIS_SERVER)) - continue; - /* don't send it if we already received the packet from - * this node. */ - if (recv_list_is_in(bat_priv, &info->recv_list, - orig_node->orig)) + if (ret) continue; - memcpy(packet->target_orig, orig_node->orig, ETH_ALEN); - batman_if = orig_node->router->if_incoming; - memcpy(dstaddr, orig_node->router->addr, ETH_ALEN); - spin_unlock_bh(&bat_priv->orig_hash_lock); + head = &hash->table[i]; - skb = skb_clone(info->skb_packet, GFP_ATOMIC); - if (skb) - send_skb_packet(skb, batman_if, dstaddr); + rcu_read_lock(); + hlist_for_each_entry_rcu(bucket, walk, head, hlist) { + orig_node = bucket->data; - spin_lock_bh(&bat_priv->orig_hash_lock); + /* if it's a vis server and reachable, send it. */ + if ((!orig_node) || (!orig_node->router)) + continue; + if (!(orig_node->flags & VIS_SERVER)) + continue; + /* don't send it if we already received the packet from + * this node. */ + if (recv_list_is_in(bat_priv, &info->recv_list, + orig_node->orig)) + continue; + memcpy(packet->target_orig, orig_node->orig, ETH_ALEN); + batman_if = orig_node->router->if_incoming; + memcpy(dstaddr, orig_node->router->addr, ETH_ALEN); + spin_unlock_bh(&bat_priv->orig_hash_lock); + + skb = skb_clone(info->skb_packet, GFP_ATOMIC); + if (skb) + send_skb_packet(skb, batman_if, dstaddr); + + spin_lock_bh(&bat_priv->orig_hash_lock); + } + rcu_read_unlock(); } spin_unlock_bh(&bat_priv->orig_hash_lock);