Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78236
b: refs/heads/master
c: 97577e3
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Jan 28, 2008
1 parent 0335ec3 commit 80f4f0a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd88590995de7c7ce108718a9ad52b3832e77814
refs/heads/master: 97577e38284f48ca773392e2d401af2f6c95dc08
8 changes: 4 additions & 4 deletions trunk/include/net/af_unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ struct unix_sock {

#ifdef CONFIG_SYSCTL
extern int sysctl_unix_max_dgram_qlen;
extern void unix_sysctl_register(void);
extern void unix_sysctl_unregister(void);
extern int unix_sysctl_register(struct net *net);
extern void unix_sysctl_unregister(struct net *net);
#else
static inline void unix_sysctl_register(void) {}
static inline void unix_sysctl_unregister(void) {}
static inline int unix_sysctl_register(struct net *net) { return 0; }
static inline void unix_sysctl_unregister(struct net *net) {}
#endif
#endif
#endif
4 changes: 2 additions & 2 deletions trunk/net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2175,15 +2175,15 @@ static int __init af_unix_init(void)

sock_register(&unix_family_ops);
register_pernet_subsys(&unix_net_ops);
unix_sysctl_register();
unix_sysctl_register(&init_net);
out:
return rc;
}

static void __exit af_unix_exit(void)
{
sock_unregister(PF_UNIX);
unix_sysctl_unregister();
unix_sysctl_unregister(&init_net);
proto_unregister(&unix_proto);
unregister_pernet_subsys(&unix_net_ops);
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/net/unix/sysctl_net_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ static ctl_table unix_root_table[] = {

static struct ctl_table_header * unix_sysctl_header;

void unix_sysctl_register(void)
int unix_sysctl_register(struct net *net)
{
unix_sysctl_header = register_sysctl_table(unix_root_table);
return unix_sysctl_header == NULL ? -ENOMEM : 0;
}

void unix_sysctl_unregister(void)
void unix_sysctl_unregister(struct net *net)
{
unregister_sysctl_table(unix_sysctl_header);
}
Expand Down

0 comments on commit 80f4f0a

Please sign in to comment.