diff options
author | Manuel Schölling <manuel.schoelling@gmx.de> | 2014-05-18 21:32:49 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-19 01:24:52 (GMT) |
commit | 71fd762f2eef6acc848e262ac934fc694b49204e (patch) | |
tree | 9e69fd992dca49eaa2e375fa47737b3b12a4d482 /net/rds/ib_send.c | |
parent | 03b8dcba1e6ea636a96d80f7adbf03d748d517ad (diff) | |
download | linux-71fd762f2eef6acc848e262ac934fc694b49204e.tar.xz |
net: rds: Use time_after() for time comparison
To be future-proof and for better readability the time comparisons are modified
to use time_after() instead of raw math.
Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/ib_send.c')
-rw-r--r-- | net/rds/ib_send.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index 37be6e2..1dde91e 100644 --- a/net/rds/ib_send.c +++ b/net/rds/ib_send.c @@ -298,7 +298,7 @@ void rds_ib_send_cq_comp_handler(struct ib_cq *cq, void *context) rds_ib_stats_inc(s_ib_tx_cq_event); if (wc.wr_id == RDS_IB_ACK_WR_ID) { - if (ic->i_ack_queued + HZ/2 < jiffies) + if (time_after(jiffies, ic->i_ack_queued + HZ/2)) rds_ib_stats_inc(s_ib_tx_stalled); rds_ib_ack_send_complete(ic); continue; @@ -315,7 +315,7 @@ void rds_ib_send_cq_comp_handler(struct ib_cq *cq, void *context) rm = rds_ib_send_unmap_op(ic, send, wc.status); - if (send->s_queued + HZ/2 < jiffies) + if (time_after(jiffies, send->s_queued + HZ/2)) rds_ib_stats_inc(s_ib_tx_stalled); if (send->s_op) { |