diff options
author | Thomas Graf <tgraf@suug.ch> | 2015-01-02 23:00:14 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-03 14:32:56 -0500 |
commit | 8d24c0b43125ec26cc80e04588477a9a2afc025c (patch) | |
tree | d02e1b74bf49017dd4fecdeaf82a1e4f8f64a25d /net/netlink | |
parent | dd9553988879a3ff71a86323b88409e7631c4e5d (diff) | |
download | op-kernel-dev-8d24c0b43125ec26cc80e04588477a9a2afc025c.zip op-kernel-dev-8d24c0b43125ec26cc80e04588477a9a2afc025c.tar.gz |
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 <tgraf@suug.ch>
Cc: netfilter-devel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r-- | net/netlink/af_netlink.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 84ea76c..a5d7ed6 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -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); } |