]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/route.c
[NET]: rt_check_expire() can take a long time, add a cond_resched()
[linux-2.6-omap-h63xx.git] / net / ipv4 / route.c
index 45651834e1e2193bcc537b18e04946dc36e194d6..1bff9ed349ff5a9e5d14ba1f09888e304bd88950 100644 (file)
@@ -578,6 +578,9 @@ static void rt_check_expire(struct work_struct *work)
                i = (i + 1) & rt_hash_mask;
                rthp = &rt_hash_table[i].chain;
 
+               if (need_resched())
+                       cond_resched();
+
                if (*rthp == NULL)
                        continue;
                spin_lock_bh(rt_hash_lock_addr(i));