]> git.baikalelectronics.ru Git - kernel.git/commitdiff
dn_route: replace "jiffies-now>0" with "jiffies!=now"
authorYu Zhe <yuzhe@nfschina.com>
Fri, 29 Jul 2022 06:17:12 +0000 (14:17 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 30 Jul 2022 03:12:49 +0000 (20:12 -0700)
Use "jiffies != now" to replace "jiffies - now > 0" to make
code more readable. We want to put a limit on how long the
loop can run for before rescheduling.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
Link: https://lore.kernel.org/r/20220729061712.22666-1-yuzhe@nfschina.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/decnet/dn_route.c

index 552a53f1d5d026cebbbf4c541620556d9da09272..ac2ee1689111205f088bf89896f52e9f7925cf7e 100644 (file)
@@ -201,7 +201,7 @@ static void dn_dst_check_expire(struct timer_list *unused)
                }
                spin_unlock(&dn_rt_hash_table[i].lock);
 
-               if ((jiffies - now) > 0)
+               if (jiffies != now)
                        break;
        }