From: Pavel Emelyanov <xemul@openvz.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Linux Netdev List <netdev@vger.kernel.org>,
Linux Containers <containers@lists.osdl.org>,
Daniel Lezcano <dlezcano@fr.ibm.com>
Subject: [PATCH 3/4 net-2.6.25][UNIX] Use ctl paths to register unix ctl tables
Date: Fri, 30 Nov 2007 19:30:49 +0300 [thread overview]
Message-ID: <47503AB9.4080808@openvz.org> (raw)
In-Reply-To: <47503919.8060103@openvz.org>
Unlike previous ones, this patch is useful by its own,
as it decreases the vmlinux size :)
But it will be used later, when the per-namespace sysctl
is added.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c
index c46cec0..43dd356 100644
--- a/net/unix/sysctl_net_unix.c
+++ b/net/unix/sysctl_net_unix.c
@@ -26,31 +26,17 @@ static ctl_table unix_table[] = {
{ .ctl_name = 0 }
};
-static ctl_table unix_net_table[] = {
- {
- .ctl_name = NET_UNIX,
- .procname = "unix",
- .mode = 0555,
- .child = unix_table
- },
- { .ctl_name = 0 }
-};
-
-static ctl_table unix_root_table[] = {
- {
- .ctl_name = CTL_NET,
- .procname = "net",
- .mode = 0555,
- .child = unix_net_table
- },
- { .ctl_name = 0 }
+static struct ctl_path unix_path[] = {
+ { .procname = "net", .ctl_name = CTL_NET, },
+ { .procname = "unix", .ctl_name = NET_UNIX, },
+ { },
};
static struct ctl_table_header * unix_sysctl_header;
int unix_sysctl_register(struct net *net)
{
- unix_sysctl_header = register_sysctl_table(unix_root_table);
+ unix_sysctl_header = register_sysctl_paths(unix_path, unix_table);
return unix_sysctl_header == NULL ? -ENOMEM : 0;
}
--
1.5.3.4
next prev parent reply other threads:[~2007-11-30 16:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-30 16:23 [PATCH 0/4 net-2.6.15][UNIX] Make unix sysctls per-namespace Pavel Emelyanov
2007-11-30 16:26 ` [PATCH 1/4 net-2.6.25][UNIX] Extend unix_sysctl_(un)register prototypes Pavel Emelyanov
2007-11-30 16:29 ` [PATCH 2/4 net-2.6.25][UNIX] Move the sysctl_unix_max_dgram_qlen on struct net Pavel Emelyanov
2007-11-30 16:30 ` Pavel Emelyanov [this message]
2007-11-30 16:34 ` [PATCH 4/4 net-2.6.25][UNIX] Make the unix sysctl tables per-namespace Pavel Emelyanov
2007-11-30 16:37 ` [PATCH 4/4 (resent) " Pavel Emelyanov
2007-12-01 12:57 ` Herbert Xu
[not found] ` <20071201125726.GC15910-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2007-12-01 13:07 ` Denis V. Lunev
2007-12-01 13:19 ` Pavel Emelyanov
2007-12-01 19:32 ` Eric W. Biederman
2007-11-30 22:23 ` [PATCH 0/4 net-2.6.15][UNIX] Make unix sysctls per-namespace Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47503AB9.4080808@openvz.org \
--to=xemul@openvz.org \
--cc=containers@lists.osdl.org \
--cc=dlezcano@fr.ibm.com \
--cc=ebiederm@xmission.com \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).