]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/core/gen_estimator.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
[linux-2.6-omap-h63xx.git] / net / core / gen_estimator.c
index 3cad026764f0c9b94f9615ee22da0f9b4ed16833..cc84d8d8a3c7d6c6c6e06a18080cfb99c50d86fa 100644 (file)
@@ -128,7 +128,8 @@ static void est_timer(unsigned long arg)
                spin_unlock(e->stats_lock);
        }
 
-       mod_timer(&elist[idx].timer, jiffies + ((HZ<<idx)/4));
+       if (elist[idx].list != NULL)
+               mod_timer(&elist[idx].timer, jiffies + ((HZ<<idx)/4));
        read_unlock(&est_lock);
 }
 
@@ -144,7 +145,7 @@ static void est_timer(unsigned long arg)
  * configuration TLV is created. Upon each interval, the latest statistics
  * will be read from &bstats and the estimated rate will be stored in
  * &rate_est with the statistics lock grabed during this period.
- * 
+ *
  * Returns 0 on success or a negative error code.
  */
 int gen_new_estimator(struct gnet_stats_basic *bstats,
@@ -231,7 +232,7 @@ void gen_kill_estimator(struct gnet_stats_basic *bstats,
  *
  * Replaces the configuration of a rate estimator by calling
  * gen_kill_estimator() and gen_new_estimator().
- * 
+ *
  * Returns 0 on success or a negative error code.
  */
 int
@@ -242,7 +243,7 @@ gen_replace_estimator(struct gnet_stats_basic *bstats,
     gen_kill_estimator(bstats, rate_est);
     return gen_new_estimator(bstats, rate_est, stats_lock, opt);
 }
-    
+
 
 EXPORT_SYMBOL(gen_kill_estimator);
 EXPORT_SYMBOL(gen_new_estimator);