summaryrefslogtreecommitdiffstats
path: root/lib/rhashtable.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-12-08 17:09:04 +0800
committerDavid S. Miller <davem@davemloft.net>2015-12-08 22:46:32 -0500
commit46c749eac979c0bf280f760971367e9babe4d05f (patch)
tree60245bd86dd38b65047283899ac739af1a534e52 /lib/rhashtable.c
parentbc22ff5363b1842b0507c4eefefde7748dbc7032 (diff)
downloadlinux-46c749eac979c0bf280f760971367e9babe4d05f.tar.gz
linux-46c749eac979c0bf280f760971367e9babe4d05f.tar.bz2
linux-46c749eac979c0bf280f760971367e9babe4d05f.zip
rhashtable: Remove unnecessary wmb for future_tbl
The patch 9497df88ab5567daa001829051c5f87161a81ff0 ("rhashtable: Fix reader/rehash race") added a pair of barriers. In fact the wmb is superfluous because every subsequent write to the old or new hash table uses rcu_assign_pointer, which itself carriers a full barrier prior to the assignment. Therefore we may remove the explicit wmb. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/rhashtable.c')
-rw-r--r--lib/rhashtable.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index a54ff8949f91..0f3be3fad2b2 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -231,9 +231,6 @@ static int rhashtable_rehash_attach(struct rhashtable *ht,
*/
rcu_assign_pointer(old_tbl->future_tbl, new_tbl);
- /* Ensure the new table is visible to readers. */
- smp_wmb();
-
spin_unlock_bh(old_tbl->locks);
return 0;