summaryrefslogtreecommitdiff
path: root/LICENSES
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-06-18 05:52:50 +0300
committerDavid S. Miller <davem@davemloft.net>2018-06-22 07:43:27 +0300
commit5af68ef7333c8606bfe6e400cb962081518c3acb (patch)
treed494680035d9537192c0c0d3094c1ee846051000 /LICENSES
parent9b4f64a227b6f462482a8cc68c7134dc6e26f1c1 (diff)
downloadlinux-5af68ef7333c8606bfe6e400cb962081518c3acb.tar.xz
rhashtable: simplify nested_table_alloc() and rht_bucket_nested_insert()
Now that we don't use the hash value or shift in nested_table_alloc() there is room for simplification. We only need to pass a "is this a leaf" flag to nested_table_alloc(), and don't need to track as much information in rht_bucket_nested_insert(). Note there is another minor cleanup in nested_table_alloc() here. The number of elements in a page of "union nested_tables" is most naturally PAGE_SIZE / sizeof(ntbl[0]) The previous code had PAGE_SIZE / sizeof(ntbl[0].bucket) which happens to be the correct value only because the bucket uses all the space in the union. Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions