Target/iser: Fix wrong connection requests list addition
authorSagi Grimberg <sagig@mellanox.com>
Tue, 29 Apr 2014 10:13:44 +0000 (13:13 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 16 May 2014 00:09:10 +0000 (17:09 -0700)
Should be adding list_add_tail($new, $head) and not
the other way around.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/infiniband/ulp/isert/ib_isert.c

index c98fdb185931644bd3ed92d337f85aa0d2517149..fda3feb4500816d44823aa8f2a49a0c798320cb9 100644 (file)
@@ -663,7 +663,7 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event)
                goto out_conn_dev;
 
        mutex_lock(&isert_np->np_accept_mutex);
-       list_add_tail(&isert_np->np_accept_list, &isert_conn->conn_accept_node);
+       list_add_tail(&isert_conn->conn_accept_node, &isert_np->np_accept_list);
        mutex_unlock(&isert_np->np_accept_mutex);
 
        pr_debug("isert_connect_request() waking up np_accept_wq: %p\n", np);