]> git.neil.brown.name Git - history.git/commitdiff
o unix: use revised net module infrastructure
authorArnaldo Carvalho de Melo <acme@conectiva.com.br>
Sat, 3 May 2003 00:39:46 +0000 (21:39 -0300)
committerArnaldo Carvalho de Melo <acme@conectiva.com.br>
Sat, 3 May 2003 00:39:46 +0000 (21:39 -0300)
Using sk_set_owner and having THIS_MODULE in the struct proto_ops registered
with the core.

net/unix/af_unix.c

index 0ba6e24475f93402979ec0804e9de682a4a5dce7..0955346cc477a3c339ade23824ce43d4a1845375 100644 (file)
@@ -494,6 +494,7 @@ static struct sock * unix_create1(struct socket *sock)
        atomic_inc(&unix_nr_socks);
 
        sock_init_data(sock,sk);
+       sk_set_owner(sk, THIS_MODULE);
 
        sk->write_space         =       unix_write_space;
 
@@ -1884,7 +1885,7 @@ done:
 
 struct proto_ops unix_stream_ops = {
        .family =       PF_UNIX,
-       
+       .owner =        THIS_MODULE,
        .release =      unix_release,
        .bind =         unix_bind,
        .connect =      unix_stream_connect,
@@ -1905,7 +1906,7 @@ struct proto_ops unix_stream_ops = {
 
 struct proto_ops unix_dgram_ops = {
        .family =       PF_UNIX,
-
+       .owner =        THIS_MODULE,
        .release =      unix_release,
        .bind =         unix_bind,
        .connect =      unix_dgram_connect,