mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
rhashtable: Do hashing inside of rhashtable_lookup_compare()
Hash the key inside of rhashtable_lookup_compare() like rhashtable_lookup() does. This allows to simplify the hashing functions and keep them private. Signed-off-by: Thomas Graf <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
dd95539888
commit
8d24c0b431
4 changed files with 61 additions and 86 deletions
|
|
@ -1002,11 +1002,8 @@ static struct sock *__netlink_lookup(struct netlink_table *table, u32 portid,
|
|||
.net = net,
|
||||
.portid = portid,
|
||||
};
|
||||
u32 hash;
|
||||
|
||||
hash = rhashtable_hashfn(&table->hash, &portid, sizeof(portid));
|
||||
|
||||
return rhashtable_lookup_compare(&table->hash, hash,
|
||||
return rhashtable_lookup_compare(&table->hash, &portid,
|
||||
&netlink_compare, &arg);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue