diff options
author | 2007-12-01 23:44:15 +1100 | |
---|---|---|
committer | 2008-01-28 14:55:22 -0800 | |
commit | d392e49756a99ba51577d265d6db83e3f01c6ac8 (patch) | |
tree | 644610d6fc7ab79a9e8a7f76357062759ec8d690 /net/unix/af_unix.c | |
parent | [UNIX]: Extend unix_sysctl_(un)register prototypes (diff) | |
download | linux-d392e49756a99ba51577d265d6db83e3f01c6ac8.tar.gz linux-d392e49756a99ba51577d265d6db83e3f01c6ac8.tar.bz2 linux-d392e49756a99ba51577d265d6db83e3f01c6ac8.zip |
[UNIX]: Move the sysctl_unix_max_dgram_qlen
This will make all the sub-namespaces always use the
default value (10) and leave the tuning via sysctl
to the init namespace only.
Per-namespace tuning is coming.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index a0aa6d3c2c08..73620d61762b 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -117,8 +117,6 @@ #include <net/checksum.h> #include <linux/security.h> -int sysctl_unix_max_dgram_qlen __read_mostly = 10; - static struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1]; static DEFINE_SPINLOCK(unix_table_lock); static atomic_t unix_nr_socks = ATOMIC_INIT(0); @@ -594,7 +592,7 @@ static struct sock * unix_create1(struct net *net, struct socket *sock) &af_unix_sk_receive_queue_lock_key); sk->sk_write_space = unix_write_space; - sk->sk_max_ack_backlog = sysctl_unix_max_dgram_qlen; + sk->sk_max_ack_backlog = net->sysctl_unix_max_dgram_qlen; sk->sk_destruct = unix_sock_destructor; u = unix_sk(sk); u->dentry = NULL; @@ -2140,6 +2138,8 @@ static int unix_net_init(struct net *net) { int error = -ENOMEM; + net->sysctl_unix_max_dgram_qlen = 10; + #ifdef CONFIG_PROC_FS if (!proc_net_fops_create(net, "unix", 0, &unix_seq_fops)) goto out; |