mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
rhashtable: Make rhashtable_init params argument const
This patch marks the rhashtable_init params argument const as there is no reason to modify it since we will always make a copy of it in the rhashtable. This patch also fixes a bug where we don't actually round up the value of min_size unless it is less than HASH_MIN_SIZE. 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>
This commit is contained in:
parent
0b8c707ddf
commit
488fb86ee9
2 changed files with 6 additions and 4 deletions
|
@ -181,7 +181,8 @@ static inline int lockdep_rht_bucket_is_held(const struct bucket_table *tbl,
|
|||
}
|
||||
#endif /* CONFIG_PROVE_LOCKING */
|
||||
|
||||
int rhashtable_init(struct rhashtable *ht, struct rhashtable_params *params);
|
||||
int rhashtable_init(struct rhashtable *ht,
|
||||
const struct rhashtable_params *params);
|
||||
|
||||
void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node);
|
||||
bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue