Whenever someone wants to retrieve the total number of elements in a
rhashtable/rhltable it needs to open code the access to 'nelems'.
Therefore provide a helper for such operation and convert two accesses as
an example.
Pedro Tammela (4):
rhashtable: add length helper for rhashtable and rhltable
rhashtable: use new length helpers
net/ipv4: use rhashtable length helper
net/ipv6: use rhashtable length helper
include/linux/rhashtable.h | 16 ++++++++++++++++
lib/rhashtable.c | 2 +-
lib/test_rhashtable.c | 4 ++--
net/ipv4/proc.c | 3 ++-
net/ipv6/proc.c | 3 ++-
5 files changed, 23 insertions(+), 5 deletions(-)
--
2.39.2