Avoid open coding the rhashtab length read
Signed-off-by: Pedro Tammela <redacted>
---
net/ipv6/proc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index e20b3705c2d2..402e4f6f9e25 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -25,6 +25,7 @@
#include <net/udp.h>
#include <net/transp_v6.h>
#include <net/ipv6.h>
+#include <linux/rhashtable.h>
#define MAX4(a, b, c, d) \
max_t(u32, max_t(u32, a, b), max_t(u32, c, d))
@@ -44,7 +45,7 @@ static int sockstat6_seq_show(struct seq_file *seq, void *v)
seq_printf(seq, "RAW6: inuse %d\n",
sock_prot_inuse_get(net, &rawv6_prot));
seq_printf(seq, "FRAG6: inuse %u memory %lu\n",
- atomic_read(&net->ipv6.fqdir->rhashtable.nelems),
+ rhashtable_len(&net->ipv6.fqdir->rhashtable),
frag_mem_limit(net->ipv6.fqdir));
return 0;
}
--
2.39.2