File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -1327,17 +1327,10 @@ static void l2tp_tunnel_del_work(struct work_struct *work)
1327
1327
1328
1328
sock = sk -> sk_socket ;
1329
1329
1330
- /* If the tunnel socket was created by userspace, then go through the
1331
- * inet layer to shut the socket down, and let userspace close it.
1332
- * Otherwise, if we created the socket directly within the kernel, use
1330
+ /* If the tunnel socket was created within the kernel, use
1333
1331
* the sk API to release it here.
1334
- * In either case the tunnel resources are freed in the socket
1335
- * destructor when the tunnel socket goes away.
1336
1332
*/
1337
- if (tunnel -> fd >= 0 ) {
1338
- if (sock )
1339
- inet_shutdown (sock , 2 );
1340
- } else {
1333
+ if (tunnel -> fd < 0 ) {
1341
1334
if (sock ) {
1342
1335
kernel_sock_shutdown (sock , SHUT_RDWR );
1343
1336
sock_release (sock );
You can’t perform that action at this time.
0 commit comments