o unix: use revised net module infrastructure

Using sk_set_owner and having THIS_MODULE in the struct proto_ops registered
with the core.
parent 38581f4a
...@@ -494,6 +494,7 @@ static struct sock * unix_create1(struct socket *sock) ...@@ -494,6 +494,7 @@ static struct sock * unix_create1(struct socket *sock)
atomic_inc(&unix_nr_socks); atomic_inc(&unix_nr_socks);
sock_init_data(sock,sk); sock_init_data(sock,sk);
sk_set_owner(sk, THIS_MODULE);
sk->write_space = unix_write_space; sk->write_space = unix_write_space;
...@@ -1884,7 +1885,7 @@ static int unix_read_proc(char *buffer, char **start, off_t offset, ...@@ -1884,7 +1885,7 @@ static int unix_read_proc(char *buffer, char **start, off_t offset,
struct proto_ops unix_stream_ops = { struct proto_ops unix_stream_ops = {
.family = PF_UNIX, .family = PF_UNIX,
.owner = THIS_MODULE,
.release = unix_release, .release = unix_release,
.bind = unix_bind, .bind = unix_bind,
.connect = unix_stream_connect, .connect = unix_stream_connect,
...@@ -1905,7 +1906,7 @@ struct proto_ops unix_stream_ops = { ...@@ -1905,7 +1906,7 @@ struct proto_ops unix_stream_ops = {
struct proto_ops unix_dgram_ops = { struct proto_ops unix_dgram_ops = {
.family = PF_UNIX, .family = PF_UNIX,
.owner = THIS_MODULE,
.release = unix_release, .release = unix_release,
.bind = unix_bind, .bind = unix_bind,
.connect = unix_dgram_connect, .connect = unix_dgram_connect,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment