diff options
author | David S. Miller <davem@davemloft.net> | 2012-06-25 18:50:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-25 18:50:32 -0400 |
commit | e486463e82e4dca9e8f4413649088b21c9ff87e5 (patch) | |
tree | 3fb17b54454a101416c2b22e6b4ea5a027b3c02b /net/batman-adv | |
parent | ed3b856b69a7f3748d6917e42d462c962aaa39b8 (diff) | |
parent | fa809e2fd6e317226c046202a88520962672eac0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/usb/qmi_wwan.c
net/batman-adv/translation-table.c
net/ipv6/route.c
qmi_wwan.c resolution provided by Bjørn Mork.
batman-adv conflict is dealing merely with the changes
of global function names to have a proper subsystem
prefix.
ipv6's route.c conflict is merely two side-by-side additions
of network namespace methods.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/translation-table.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 5180d50e909d..3806d9bbf55e 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -139,13 +139,14 @@ static void tt_orig_list_entry_free_rcu(struct rcu_head *rcu) | |||
139 | struct tt_orig_list_entry *orig_entry; | 139 | struct tt_orig_list_entry *orig_entry; |
140 | 140 | ||
141 | orig_entry = container_of(rcu, struct tt_orig_list_entry, rcu); | 141 | orig_entry = container_of(rcu, struct tt_orig_list_entry, rcu); |
142 | atomic_dec(&orig_entry->orig_node->tt_size); | ||
143 | batadv_orig_node_free_ref(orig_entry->orig_node); | 142 | batadv_orig_node_free_ref(orig_entry->orig_node); |
144 | kfree(orig_entry); | 143 | kfree(orig_entry); |
145 | } | 144 | } |
146 | 145 | ||
147 | static void tt_orig_list_entry_free_ref(struct tt_orig_list_entry *orig_entry) | 146 | static void tt_orig_list_entry_free_ref(struct tt_orig_list_entry *orig_entry) |
148 | { | 147 | { |
148 | /* to avoid race conditions, immediately decrease the tt counter */ | ||
149 | atomic_dec(&orig_entry->orig_node->tt_size); | ||
149 | call_rcu(&orig_entry->rcu, tt_orig_list_entry_free_rcu); | 150 | call_rcu(&orig_entry->rcu, tt_orig_list_entry_free_rcu); |
150 | } | 151 | } |
151 | 152 | ||
@@ -958,7 +959,6 @@ void batadv_tt_global_del_orig(struct bat_priv *bat_priv, | |||
958 | } | 959 | } |
959 | spin_unlock_bh(list_lock); | 960 | spin_unlock_bh(list_lock); |
960 | } | 961 | } |
961 | atomic_set(&orig_node->tt_size, 0); | ||
962 | orig_node->tt_initialised = false; | 962 | orig_node->tt_initialised = false; |
963 | } | 963 | } |
964 | 964 | ||
@@ -2148,10 +2148,10 @@ bool batadv_is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, | |||
2148 | { | 2148 | { |
2149 | struct tt_local_entry *tt_local_entry = NULL; | 2149 | struct tt_local_entry *tt_local_entry = NULL; |
2150 | struct tt_global_entry *tt_global_entry = NULL; | 2150 | struct tt_global_entry *tt_global_entry = NULL; |
2151 | bool ret = true; | 2151 | bool ret = false; |
2152 | 2152 | ||
2153 | if (!atomic_read(&bat_priv->ap_isolation)) | 2153 | if (!atomic_read(&bat_priv->ap_isolation)) |
2154 | return false; | 2154 | goto out; |
2155 | 2155 | ||
2156 | tt_local_entry = tt_local_hash_find(bat_priv, dst); | 2156 | tt_local_entry = tt_local_hash_find(bat_priv, dst); |
2157 | if (!tt_local_entry) | 2157 | if (!tt_local_entry) |
@@ -2161,10 +2161,10 @@ bool batadv_is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, | |||
2161 | if (!tt_global_entry) | 2161 | if (!tt_global_entry) |
2162 | goto out; | 2162 | goto out; |
2163 | 2163 | ||
2164 | if (_is_ap_isolated(tt_local_entry, tt_global_entry)) | 2164 | if (!_is_ap_isolated(tt_local_entry, tt_global_entry)) |
2165 | goto out; | 2165 | goto out; |
2166 | 2166 | ||
2167 | ret = false; | 2167 | ret = true; |
2168 | 2168 | ||
2169 | out: | 2169 | out: |
2170 | if (tt_global_entry) | 2170 | if (tt_global_entry) |