diff options
-rw-r--r-- | net/ipv4/fib_trie.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 44cab1d41463..83290beaf7cf 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -830,7 +830,7 @@ static struct key_vector *resize(struct trie *t, struct key_vector *tn) | |||
830 | /* Double as long as the resulting node has a number of | 830 | /* Double as long as the resulting node has a number of |
831 | * nonempty nodes that are above the threshold. | 831 | * nonempty nodes that are above the threshold. |
832 | */ | 832 | */ |
833 | while (should_inflate(tp, tn) && max_work) { | 833 | while (should_inflate(tp, tn) && max_work--) { |
834 | tp = inflate(t, tn); | 834 | tp = inflate(t, tn); |
835 | if (!tp) { | 835 | if (!tp) { |
836 | #ifdef CONFIG_IP_FIB_TRIE_STATS | 836 | #ifdef CONFIG_IP_FIB_TRIE_STATS |
@@ -839,7 +839,6 @@ static struct key_vector *resize(struct trie *t, struct key_vector *tn) | |||
839 | break; | 839 | break; |
840 | } | 840 | } |
841 | 841 | ||
842 | max_work--; | ||
843 | tn = get_child(tp, cindex); | 842 | tn = get_child(tp, cindex); |
844 | } | 843 | } |
845 | 844 | ||
@@ -850,7 +849,7 @@ static struct key_vector *resize(struct trie *t, struct key_vector *tn) | |||
850 | /* Halve as long as the number of empty children in this | 849 | /* Halve as long as the number of empty children in this |
851 | * node is above threshold. | 850 | * node is above threshold. |
852 | */ | 851 | */ |
853 | while (should_halve(tp, tn) && max_work) { | 852 | while (should_halve(tp, tn) && max_work--) { |
854 | tp = halve(t, tn); | 853 | tp = halve(t, tn); |
855 | if (!tp) { | 854 | if (!tp) { |
856 | #ifdef CONFIG_IP_FIB_TRIE_STATS | 855 | #ifdef CONFIG_IP_FIB_TRIE_STATS |
@@ -859,7 +858,6 @@ static struct key_vector *resize(struct trie *t, struct key_vector *tn) | |||
859 | break; | 858 | break; |
860 | } | 859 | } |
861 | 860 | ||
862 | max_work--; | ||
863 | tn = get_child(tp, cindex); | 861 | tn = get_child(tp, cindex); |
864 | } | 862 | } |
865 | 863 | ||