Skip to content

Commit

Permalink
dn_route: replace "jiffies-now>0" with "jiffies!=now"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yu Zhe authored and Jakub Kicinski committed Jul 30, 2022
1 parent ff4970b commit 0f14a83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/decnet/dn_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0f14a83

Please sign in to comment.