Commit c6b8e918 authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Nicholas Bellinger

iser-target: Get rid of redundant max_accept

Not sure what it was used for, but there is
no real need for it now as I see it. Go ahead
and get rid of it.
Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent ae9ea9ed
......@@ -3209,11 +3209,11 @@ isert_accept_np(struct iscsi_np *np, struct iscsi_conn *conn)
{
struct isert_np *isert_np = np->np_context;
struct isert_conn *isert_conn;
int max_accept = 0, ret;
int ret;
accept_wait:
ret = down_interruptible(&isert_np->np_sem);
if (ret || max_accept > 5)
if (ret)
return -ENODEV;
spin_lock_bh(&np->np_thread_lock);
......@@ -3232,7 +3232,6 @@ isert_accept_np(struct iscsi_np *np, struct iscsi_conn *conn)
mutex_lock(&isert_np->np_accept_mutex);
if (list_empty(&isert_np->np_accept_list)) {
mutex_unlock(&isert_np->np_accept_mutex);
max_accept++;
goto accept_wait;
}
isert_conn = list_first_entry(&isert_np->np_accept_list,
......@@ -3242,7 +3241,6 @@ isert_accept_np(struct iscsi_np *np, struct iscsi_conn *conn)
conn->context = isert_conn;
isert_conn->conn = conn;
max_accept = 0;
isert_set_conn_info(np, conn, isert_conn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment