]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IPoIB/cm: Fix reaping of stale connections
authorMichael S. Tsirkin <mst@dev.mellanox.co.il>
Thu, 22 Mar 2007 21:32:09 +0000 (14:32 -0700)
committerRoland Dreier <rolandd@cisco.com>
Thu, 22 Mar 2007 21:32:09 +0000 (14:32 -0700)
The sense of the time_after_eq() test in ipoib_cm_stale_task() is
reversed so that only non-stale connections are reaped.  Fix this by
changing to time_before_eq().

Noticed by Pradeep Satyanarayana <pradeep@us.ibm.com>.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_cm.c

index 3484e8ba24a44672e109afda1c335856b525e0e5..467564074e9334f80f49764d182ccff5f96c1ef7 100644 (file)
@@ -1095,7 +1095,7 @@ static void ipoib_cm_stale_task(struct work_struct *work)
                /* List if sorted by LRU, start from tail,
                 * stop when we see a recently used entry */
                p = list_entry(priv->cm.passive_ids.prev, typeof(*p), list);
-               if (time_after_eq(jiffies, p->jiffies + IPOIB_CM_RX_TIMEOUT))
+               if (time_before_eq(jiffies, p->jiffies + IPOIB_CM_RX_TIMEOUT))
                        break;
                list_del_init(&p->list);
                spin_unlock_irqrestore(&priv->lock, flags);