Re: rhashtable: Move hash_rnd into bucket_table
From: David Miller <hidden>
Date: 2015-03-09 19:55:44
From: David Miller <hidden>
Date: 2015-03-09 19:55:44
From: David Miller <redacted> Date: Mon, 09 Mar 2015 15:51:37 -0400 (EDT)
From: Herbert Xu <herbert@gondor.apana.org.au> Date: Mon, 9 Mar 2015 20:58:33 +1100quoted
Currently hash_rnd is a parameter that users can set. However, no existing users set this parameter. It is also something that people are unlikely to want to set directly since it's just a random number. In preparation for allowing the reseeding/rehashing of rhashtable, this patch moves hash_rnd into bucket_table so that it's now an internal state rather than a parameter. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>Thomas is right, you're going to have to move the hash_rnd initialization to where we allocate the bucket tables, otherwise the first shrink/expand will set it to zero.
My bad, Daniel pointed this out, not Thomas. Sorry about that.