aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm
diff options
context:
space:
mode:
Diffstat (limited to 'net/atm')
-rw-r--r--net/atm/common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/atm/common.c b/net/atm/common.c
index 24216642d696..806fc0a40051 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -126,10 +126,19 @@ static void vcc_write_space(struct sock *sk)
126 rcu_read_unlock(); 126 rcu_read_unlock();
127} 127}
128 128
129static void vcc_release_cb(struct sock *sk)
130{
131 struct atm_vcc *vcc = atm_sk(sk);
132
133 if (vcc->release_cb)
134 vcc->release_cb(vcc);
135}
136
129static struct proto vcc_proto = { 137static struct proto vcc_proto = {
130 .name = "VCC", 138 .name = "VCC",
131 .owner = THIS_MODULE, 139 .owner = THIS_MODULE,
132 .obj_size = sizeof(struct atm_vcc), 140 .obj_size = sizeof(struct atm_vcc),
141 .release_cb = vcc_release_cb,
133}; 142};
134 143
135int vcc_create(struct net *net, struct socket *sock, int protocol, int family) 144int vcc_create(struct net *net, struct socket *sock, int protocol, int family)
@@ -158,6 +167,7 @@ int vcc_create(struct net *net, struct socket *sock, int protocol, int family)
158 vcc->pop = NULL; 167 vcc->pop = NULL;
159 vcc->owner = NULL; 168 vcc->owner = NULL;
160 vcc->push_oam = NULL; 169 vcc->push_oam = NULL;
170 vcc->release_cb = NULL;
161 vcc->vpi = vcc->vci = 0; /* no VCI/VPI yet */ 171 vcc->vpi = vcc->vci = 0; /* no VCI/VPI yet */
162 vcc->atm_options = vcc->aal_options = 0; 172 vcc->atm_options = vcc->aal_options = 0;
163 sk->sk_destruct = vcc_sock_destruct; 173 sk->sk_destruct = vcc_sock_destruct;