[IPV4]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure

Trivial patch to make "tcp,udp,udplite,raw" protocols uses the fast
"inuse sockets" infrastructure

Each protocol use then a static percpu var, instead of a dynamic one.
This saves some ram and some cpu cycles

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet 2007-11-05 23:39:16 -08:00 committed by David S. Miller
parent 286ab3d460
commit 47a31a6ffc
4 changed files with 12 additions and 0 deletions

View file

@ -760,6 +760,8 @@ static int raw_ioctl(struct sock *sk, int cmd, unsigned long arg)
}
}
DEFINE_PROTO_INUSE(raw)
struct proto raw_prot = {
.name = "RAW",
.owner = THIS_MODULE,
@ -781,6 +783,7 @@ struct proto raw_prot = {
.compat_setsockopt = compat_raw_setsockopt,
.compat_getsockopt = compat_raw_getsockopt,
#endif
REF_PROTO_INUSE(raw)
};
#ifdef CONFIG_PROC_FS