Skip to content

Commit

Permalink
RDMA/iwcm: Fix comment for iwcm_deref_id() to match code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Krishna Kumar authored and Roland Dreier committed Nov 29, 2006
1 parent 715a588 commit 9ab1ffa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/infiniband/core/iwcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 9ab1ffa

Please sign in to comment.