patch-1.3.65 linux/net/ipv4/timer.c

Next file: linux/net/ipv4/udp.c
Previous file: linux/net/ipv4/tcp_timer.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.64/linux/net/ipv4/timer.c linux/net/ipv4/timer.c
@@ -92,8 +92,7 @@
 	 * only process if socket is not in use
 	 */
 
-	cli();
-	if (sk->inuse || in_bh) 
+	if (sk->users)
 	{
 		sk->timer.expires = jiffies+10;
 		add_timer(&sk->timer);
@@ -101,9 +100,6 @@
 		return;
 	}
 
-	sk->inuse = 1;
-	sti();
-
 	/* Always see if we need to send an ack. */
 
 	if (sk->ack_backlog && !sk->zapped) 
@@ -121,7 +117,6 @@
 			if (! sk->dead || sk->state != TCP_CLOSE) 
 			{
 				printk ("non dead socket in time_done\n");
-				release_sock (sk);
 				break;
 			}
 			destroy_sock (sk);
@@ -137,10 +132,10 @@
 				sk->wmem_alloc++;	/* So it DOESN'T go away */
 				destroy_sock (sk);
 				sk->wmem_alloc--;	/* Might now have hit 0 - fall through and do it again if so */
-				sk->inuse = 0;	/* This will be ok, the destroy won't totally work */
+				sk->users = 0;	/* This will be ok, the destroy won't totally work */
 			}
 			if(sk->wmem_alloc==0 && sk->rmem_alloc==0)
-				destroy_sock(sk);	/* Socket gone, DON'T update sk->inuse! */
+				destroy_sock(sk);	/* Socket gone, DON'T update sk->users! */
 			break;
 
 		case TIME_CLOSE:
@@ -151,12 +146,10 @@
 				sk->state_change(sk);
 			sk->shutdown = SHUTDOWN_MASK;
 			reset_timer (sk, TIME_DESTROY, TCP_DONE_TIME);
-			release_sock (sk);
 			break;
 
 		default:
 			printk ("net_timer: timer expired - reason %d is unknown\n", why);
-			release_sock (sk);
 			break;
 	}
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this