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>
This commit is contained in:
committed by
David S. Miller
parent
c3ccc12339
commit
248969ae31
@@ -566,9 +566,10 @@ static const struct proto_ops unix_seqpacket_ops = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct proto unix_proto = {
|
static struct proto unix_proto = {
|
||||||
.name = "UNIX",
|
.name = "UNIX",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.obj_size = sizeof(struct unix_sock),
|
.sockets_allocated = &unix_nr_socks,
|
||||||
|
.obj_size = sizeof(struct unix_sock),
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user