aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorGravatar NeilBrown <neilb@suse.com> 2018-06-18 12:52:50 +1000
committerGravatar David S. Miller <davem@davemloft.net> 2018-06-22 13:43:27 +0900
commit5af68ef7333c8606bfe6e400cb962081518c3acb (patch)
treed494680035d9537192c0c0d3094c1ee846051000 /mm
parentrhashtable: simplify INIT_RHT_NULLS_HEAD() (diff)
downloadlinux-5af68ef7333c8606bfe6e400cb962081518c3acb.tar.gz
linux-5af68ef7333c8606bfe6e400cb962081518c3acb.tar.bz2
linux-5af68ef7333c8606bfe6e400cb962081518c3acb.zip
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 'mm')
0 files changed, 0 insertions, 0 deletions