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 <herb...@gondor.apana.org.au>

diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 1c624db..d1f94b4 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -232,9 +232,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;
-- 
Email: Herbert Xu <herb...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to