summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorKrishna Kumar <krkumar2@in.ibm.com>2006-11-09 05:00:48 +0100
committerRoland Dreier <rolandd@cisco.com>2006-11-30 00:33:08 +0100
commit9ab1ffa8775d9c677b1301cccce8a7d91e5163d0 (patch)
treefaeb67b61284d49b0cf661be670f3f3c7bfbc340 /drivers/infiniband
parentRDMA/iwcm: Remove unnecessary function argument (diff)
downloadlinux-9ab1ffa8775d9c677b1301cccce8a7d91e5163d0.tar.xz
linux-9ab1ffa8775d9c677b1301cccce8a7d91e5163d0.zip
RDMA/iwcm: Fix comment for iwcm_deref_id() to match code
In iwcm_deref_id(), the comment says : "If the last reference is being removed and iw_destroy_cm_id is waiting, wake up the waiting thread". The second part of the comment, "and iw_destroy_cm_id is waiting," is wrong, since this function either wakes the waiter already waiting in iwcm_deref_id, or enables it (so that when wait_for_completion() is performed later, it will immediately return). Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Acked-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/iwcm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index 54faa033d89e..cf797d7aea09 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -147,8 +147,9 @@ static int copy_private_data(struct iw_cm_event *event)
}
/*
- * Release a reference on cm_id. If the last reference is being removed
- * and iw_destroy_cm_id is waiting, wake up the waiting thread.
+ * Release a reference on cm_id. If the last reference is being
+ * released, enable the waiting thread (in iw_destroy_cm_id) to
+ * get woken up, and return 1 if a thread is already waiting.
*/
static int iwcm_deref_id(struct iwcm_id_private *cm_id_priv)
{