Commit f286f97f authored by David S. Miller's avatar David S. Miller

[NET]: Use time_before in dst_set_expires.

parent 10240843
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/jiffies.h>
#include <net/neighbour.h> #include <net/neighbour.h>
#include <asm/processor.h> #include <asm/processor.h>
...@@ -208,7 +209,7 @@ static inline void dst_set_expires(struct dst_entry *dst, int timeout) ...@@ -208,7 +209,7 @@ static inline void dst_set_expires(struct dst_entry *dst, int timeout)
if (expires == 0) if (expires == 0)
expires = 1; expires = 1;
if (dst->expires == 0 || (long)(dst->expires - expires) > 0) if (dst->expires == 0 || time_before(expires, dst->expires))
dst->expires = expires; dst->expires = expires;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment