diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2008-11-17 03:00:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-17 03:00:30 -0500 |
commit | 248969ae31e1b3276fc4399d67ce29a5d81e6fd9 (patch) | |
tree | 13b57b061262af3cb2fba0aa8384d67f999ba7c2 | |
parent | c3ccc12339afa2633c72131e2aa97d52d9ca1b8a (diff) |
net: af_unix can make unix_nr_socks visbile in /proc
Currently, /proc/net/protocols displays socket counts only for TCP/TCPv6
protocols
We can provide unix_nr_socks for free here, this counter being
already maintained in af_unix
Before patch :
# grep UNIX /proc/net/protocols
UNIX 428 -1 -1 NI 0 yes kernel
After patch :
# grep UNIX /proc/net/protocols
UNIX 428 98 -1 NI 0 yes kernel
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/unix/af_unix.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 58db2a2f115a..a1eb5969712c 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -566,9 +566,10 @@ static const struct proto_ops unix_seqpacket_ops = { | |||
566 | }; | 566 | }; |
567 | 567 | ||
568 | static struct proto unix_proto = { | 568 | static struct proto unix_proto = { |
569 | .name = "UNIX", | 569 | .name = "UNIX", |
570 | .owner = THIS_MODULE, | 570 | .owner = THIS_MODULE, |
571 | .obj_size = sizeof(struct unix_sock), | 571 | .sockets_allocated = &unix_nr_socks, |
572 | .obj_size = sizeof(struct unix_sock), | ||
572 | }; | 573 | }; |
573 | 574 | ||
574 | /* | 575 | /* |