IB/iser: Clarify a duplicate counters check
authorRoi Dayan <roid@mellanox.com>
Thu, 31 Jul 2014 10:27:51 +0000 (13:27 +0300)
committerRoland Dreier <roland@purestorage.com>
Fri, 1 Aug 2014 22:10:05 +0000 (15:10 -0700)
This is to prevent someone from thinking that this code section is
redundant.

Signed-off-by: Ariel Nahum <arieln@mellanox.com>
Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/iser/iser_verbs.c

index 06a49b3df3fd1eb61ac5fcf32439d872ee05e09b..3ef167f97d6fd8468a266b3d45198ae72e30b198 100644 (file)
@@ -783,7 +783,10 @@ static void iser_disconnected_handler(struct rdma_cm_id *cma_id)
                        iser_err("iscsi_iser connection isn't bound\n");
        }
 
-       /* Complete the termination process if no posts are pending */
+       /* Complete the termination process if no posts are pending. This code
+        * block also exists in iser_handle_comp_error(), but it is needed here
+        * for cases of no flushes at all, e.g. discovery over rdma.
+        */
        if (ib_conn->post_recv_buf_count == 0 &&
            (atomic_read(&ib_conn->post_send_buf_count) == 0)) {
                complete(&ib_conn->flush_completion);