patch-2.1.34 linux/net/ipv4/fib.c

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

diff -u --recursive --new-file v2.1.33/linux/net/ipv4/fib.c linux/net/ipv4/fib.c
@@ -117,11 +117,11 @@
  */
 
 static struct wait_queue *fib_wait;
-atomic_t fib_users;
+static atomic_t fib_users = ATOMIC_INIT;
 
 static void fib_lock(void)
 {
-	while (fib_users)
+	while (atomic_read(&fib_users))
 		sleep_on(&fib_wait);
 	atomic_inc(&fib_users);
 	dev_lock_list();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov