aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/srpt/ib_srpt.c
diff options
context:
space:
mode:
authorNicholas Mc Guire <der.herr@hofr.at>2015-01-16 12:20:17 +0100
committerNicholas Bellinger <nab@linux-iscsi.org>2015-01-20 15:48:17 -0800
commitecc3f3edbfb65e7706d704c5aac0f7bd60df93de (patch)
tree727e8f294a1756d502ed8fd1669c4b9dce3737b2 /drivers/infiniband/ulp/srpt/ib_srpt.c
parentiscsi-target: use '%*ph' specifier to dump hex buffer (diff)
downloadlinux-dev-ecc3f3edbfb65e7706d704c5aac0f7bd60df93de.tar.xz
linux-dev-ecc3f3edbfb65e7706d704c5aac0f7bd60df93de.zip
ib_srpt: wait_for_completion_timeout does not return negative status
This patch changes srpt_close_session() to properly use an unsigned long for wait_for_completion_timeout()'s return value, and to update WARN_ON() to only trigger for a zero return. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index eb694ddad79f..6e0a477681e9 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -3518,7 +3518,7 @@ static void srpt_close_session(struct se_session *se_sess)
DECLARE_COMPLETION_ONSTACK(release_done);
struct srpt_rdma_ch *ch;
struct srpt_device *sdev;
- int res;
+ unsigned long res;
ch = se_sess->fabric_sess_ptr;
WARN_ON(ch->sess != se_sess);
@@ -3533,7 +3533,7 @@ static void srpt_close_session(struct se_session *se_sess)
spin_unlock_irq(&sdev->spinlock);
res = wait_for_completion_timeout(&release_done, 60 * HZ);
- WARN_ON(res <= 0);
+ WARN_ON(res == 0);
}
/**